views:

345

answers:

1

I was playing around with VS2010 beta2. I noticed that if I try to add System.Core.dll to a project which does not already have a reference to that, in VS2010, it complains saying I cannot add that assembly as it is already referenced by the project system. Any idea why they are doing that in VS2010/4.0? Is it because they have forwarded few types to mscorlib from System.Core?

+1  A: 

System.Core has been part of the required framework since 3.5, because it includes things like ExtensionAttribute and the LINQ Standard Query Operators. Similarly, if you create a 3.5 project in VS2008, it will automatically add a reference to System.Core for you.

itowlson
I know it adds reference to System.Core by default even in 3.5. But the difference here is, if you remove that reference of System.Core from the project, then try to add it back, it will crib saying that the assembly is already to the project. This does not happen in 3.5.
Niranjan
That sounds like a bug: either it should not let you remove this required reference, or it should let you add it back if you do remove the reference. May be worth reporting on Connect.
itowlson
Bug raised: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=525663
Niranjan