[英]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. 我刚刚将项目升级到3.5 SP1,并尝试将LINQ to SQL类项目添加到项目中,但由于它未出现在“添加项目”列表中而无法这样做。
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. 虽然如果我在相同的解决方案中创建一个新项目并尝试将其添加到项目中(LINQ to SQL类)可用,则可以将其添加到项目中。
What do i have to do to be able to add LINQ to SQL classes to my existing/upgraded project? 为了将LINQ添加到现有/已升级项目的SQL类中,我该怎么做?
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. 编辑为了明确起见,您可以通过Visual Studio“升级”项目,但仍可以将其设置为以旧版本的.NET为目标。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.