简体   繁体   中英

Can't add LINQ to SQL Classes in project upgraded to 3.5

I just upgraded a project to 3.5 SP1 and trying to add a LINQ to SQL class item to the project and can't as it doesn't appear in the Add Item list.

Though if i create a new project in the same solution and try adding it the item (LINQ to SQL classes) is available and I can add it to the project.

What do i have to do to be able to add LINQ to SQL classes to my existing/upgraded project?

Right click the project, go to properties, and make sure you have the project set to target the correct version of the framework.

Edit To clarify, you can "upgrade" a project through Visual Studio but it can still be set to target an older version of .NET.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM