There seems to be a bug from Microsoft, where the Target Framework for v3.5 in VS2010 is the v3.0 GAC! Moving problem builds to the v3.0 folder seems to be starting to solve the problems, but a little messy. I think I'll wait for Microsoft to get the correct fix for VS 2010!
http://www.cnblogs.com/dudu/archive/2010/06/24/1764549.html
Google translate helps with this link!
More information about the assemblies copied to the v3.0 folder from the v3.5 folder, as a workaround for this VS 2010 error:
http://forums.asp.net/p/1569744/3942724.aspx
If someone else encounters this problem and wants to track / vote on the status of this error with Microsoft: https://connect.microsoft.com/VisualStudio/feedback/details/570557/targeting-net-framework-3-5-actually -targets-3-0-gac
Update. Microsoft published the following patch for the bug report that I raised:
To create a target site on 3.5, add the compiler tag to the web.config file, as I insert below, so compiling the language will select the correct version of vbc.exe. You can create a new website 3.5, and by default web.config has those tags that you can link to.
<system.codedom> <compilers> <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <providerOption name="CompilerVersion" value="v3.5"/> <providerOption name="OptionInfer" value="true"/> <providerOption name="WarnAsError" value="false"/> </compiler> </compilers> </system.codedom>
Gavin
source share