3
Vote

Beta: error CS0234: The type or namespace name 'TargetFrameworkAttribute' does not exist in the namespace 'System.Runtime.Versioning' (are you missing an assembly reference?)

description

I just downloaded and installed the beta. I opened my VS 2010 solution and added a new WSPBuilder project (no workflow). Then, I just did a build and I'm getting this error. Any idea what I'm doing wrong? Thanks.

comments

HowardBlackmore wrote Oct 27, 2010 at 3:41 PM

the problem is in the first property group of the project file
<TargetFrameworkVersion>3.5</TargetFrameworkVersion>
should be
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
the 'v' prefix is missing

OiDatsMyLeg wrote Mar 21, 2011 at 2:33 AM

As a workaround, you can change the target framework to be another version and build the project. Then change the version back to v3.5 and rebuild. It worked for me when reloading the project/solution didn't but YMMV.

DavidLozzi wrote Jun 30, 2011 at 1:42 PM

I corrected the issue by selected v4 in the project properties, then going back and selecting v3.5

wrote Sep 19, 2011 at 7:12 PM

wrote Feb 22, 2013 at 12:14 AM