Do NOT remove the reference to System.Core from your VS2010 Project

Posted by Lee Brandt on Geeks with Blogs See other posts from Geeks with Blogs or by Lee Brandt
Published on Fri, 23 Apr 2010 11:04:15 GMT Indexed on 2010/04/23 18:14 UTC
Read the original article Hit count: 494

Filed under:

One of the things I routinely do when adding a new class library project, is remove all references and just add them back in as I need them. That is NOT a good idea for Visual Studio 2010. When I DID need System.Core, and went to add it back, this is what I got:

"A reference to 'System.Core' could not be added. This component is automatically referenced..."

After some Googling I found this article:

http://connect.microsoft.com/VisualStudio/feedback/details/525663/cannot-remove-system-core-dll-reference-from-a-vs2010-project

It tells you to add it back manually. Here is the part that needs back in the project file. After the last PropertyGroup node, add this node:

  <ItemGroup>
    <Reference Include="System.Core" />
  </ItemGroup>

You should be good to go again.

Hope this helps.

© Geeks with Blogs or respective owner