title: Visual Studio 2010 Can no longer build .NET v3.5
body: <p>I have a 2010 project that is targeting .NET v3.5. Inexplicably I can no longer build v3.5 projects. The project doesn't have ANY references added. It won't even let me add a reference to System.Core as it is added by the 'build system'. </p>
  
  <blockquote>
    <p>warning CS1685: The predefined type 'System.Func' is defined in
    multiple assemblies in the global
    alias; using definition from
    'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll'</p>
    
    <p>IFilter.cs(82,49): error CS0433: The type 'System.Func'
    exists in both 'c:\Program Files
    (x86)\Reference
    Assemblies\Microsoft\Framework\v3.5\System.Core.dll'
    and
    'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll'</p>
  </blockquote>
  
  <p>Looks like something is grabbing onto 4.0 but I'm not quite sure how to fix it. Any one else run into this?</p>
  
  <p>Coworker had this same issue. It took a reinstall of Windows to correct the problem</p>
  
  <p>I've opened a bug on this one: <a href="https://connect.microsoft.com/VisualStudio/feedback/details/558245/warning-cs1685-when-compiling-a-v3-5-net-application-in-visual-studio-2010" rel="noreferrer">https://connect.microsoft.com/VisualStudio/feedback/details/558245/warning-cs1685-when-compiling-a-v3-5-net-application-in-visual-studio-2010</a></p>
  
  <p>If the compiler is set to verbose I see this:</p>
  
  <blockquote>
    <p>FrameworkPathOverride =
    C:\Windows\Microsoft.NET\Framework\v4.0.30319</p>
  </blockquote>
  
  <p>which is <a href="http://msdn.microsoft.com/en-us/library/bb629394.aspx" rel="noreferrer">defined</a> as:</p>
  
  <blockquote>
    <p>Specifies the location of mscorlib.dll
    and microsoft.visualbasic.dll. This
    parameter is equivalent to the
    /sdkpath switch of the vbc.exe
    compiler.</p>
  </blockquote>
  
  <p>Some other interesting tidbits: I've created a new project all together and cannot build v3.5 at all. I can build 2.0, 3.0, 3.5 Client Profile, 4.0 and 4.0 Client Profile with no problem. VB.NET can build v3.5 but C# cannot. I've tried a reinstall of .NET 3.5, 4.0 and Visual Studio 2010 with no success. Visual Studio debug logs shown nothing interesting and Safe Mode does not work.</p>
  
  <p>Trying to avoid a Windows reinstall...</p>
  
  <p>EDIT: I've come to realize others are facing this issue as well. <a href="http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/b2c30611-633e-4c14-9a6a-257fee9ddf6a" rel="noreferrer">Link</a>, <a href="http://social.msdn.microsoft.com/Forums/en/setupprerelease/thread/fe431ea3-4760-43b3-a5c1-2ccb2d2c158d" rel="noreferrer">Link</a>, <a href="http://social.msdn.microsoft.com/Forums/en/sharepointdevelopmentprerelease/thread/05a9eb3e-eb90-4110-98ca-6b6396ecad4a" rel="noreferrer">Link</a></p>
  
  <hr>
  
  <p>Reinstalled several times. Visual Studio uninstalls do not clean up after themselves. I've spun up a VM to develop on until I have a chance to reinstall my main OS.</p>