[英]Where are project level imports stored in Visual Studio 2008?
I have a Web Service Application Project in Visual Studio 2008. This is supposed to be an ASP.Net 2.0 project and at some point this has been rebuilt using 3.5.我在 Visual Studio 2008 中有一个 Web 服务应用程序项目。这应该是一个 ASP.Net 2.0 项目,并且在某些时候已经使用 3.5 进行了重建。
VS has kindly added in project level imports to System.Linq and System.Xml.Linq, but when I have re-targeted the project at 2.0 these project level imports have remained. VS 在项目级导入中添加了 System.Linq 和 System.Xml.Linq,但是当我将项目重新定位到 2.0 时,这些项目级导入仍然存在。
Because the Web Service Application Project does not have the detailed window for editing project references I cannot find how to remove these project level imports.因为 Web 服务应用项目没有详细的 window 用于编辑项目引用,所以我找不到如何删除这些项目级别的导入。
There is no.proj file which is where I would assume these were included.没有.proj 文件,我认为这些文件包含在其中。
I cannot now build the project as it fails, even though I only get warnings (no errors reported) such as this:我现在无法构建项目,因为它失败了,即使我只收到警告(没有报告错误),例如:
Namespace or type specified in the project-level Imports 'System.Linq' doesn't contain any public member or cannot be found.在项目级导入“System.Linq”中指定的命名空间或类型不包含任何公共成员或找不到。 Make sure the namespace or the type is defined and contains at least one public member.
确保命名空间或类型已定义并包含至少一个公共成员。 Make sure the imported element name doesn't use any aliases.
确保导入的元素名称不使用任何别名。
Help would be much appreciated.帮助将不胜感激。
Do the following请执行下列操作
You can do one of either two things.你可以做两件事之一。
1. In Visual Studio, expand the "References" folder and delete each offending reference by right-clicking and selecting delete. 1.在 Visual Studio 中,展开“References”文件夹并通过右键单击并选择删除来删除每个有问题的引用。
2. Edit the project file and delete the offending references from their respective ItemGroup
section. 2.编辑项目文件并从其各自的
ItemGroup
部分中删除有问题的引用。
I had the same issue with a web application project - the offending lines were in web.config.我在 web 应用程序项目中遇到了同样的问题 - 违规行位于 web.config 中。 Not sure if the web service project has a web.config, but look in whatever it uses as an equivalent.
不确定 web 服务项目是否具有 web.config,但请查看它使用的任何等效项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.