【发布时间】:2014-07-06 21:27:43
【问题描述】:
我正在使用 Visual Studio Professional 2013,我正在尝试导入其文件位于 SVN 上的 ASP.NET 网站,以便我可以在本地运行和调试该网站。我创建了一个新网站并将目标框架更改为 .NET 3.5(这就是构建网站的人告诉我的内容)。因此,我将文件复制到网站目录,并使用“添加->现有网站”将它们添加到解决方案中。
我特别收到此错误:
The type or namespace name 'ServiceModel' does not exist in the namespace 'System' (are you missing an assembly reference?)
所以,我想,我只是添加一个对 ServiceModel 的引用,没什么大不了的。所以,我右键项目,去添加引用,在Assemblies->Framework下查找System.ServiceModel,勾选,点击ok。然后会发生这种情况:
The Web site is already referencing the assembly 'System.ServiceModel'.
这些事情可能会有所帮助:
- 我的目标框架不是“客户端配置文件”。我在 VS2013 中没有该选项
- 当我创建一个新的网站项目并添加一个基本类文件时,我可以使用 System.ServiceModel 命名空间,因为它已经被引用。
- 当我在“项目引用”的类视图中查看时,我没有看到 System.ServiceModel。在上面的“新网站项目”中,我确实看到了 Class View 下的 System.ServiceModel。
【问题讨论】:
-
你解决过这个问题吗?我遇到了类似的问题。
标签: c# asp.net .net-3.5 visual-studio-2013