Visual Studio 2008版本问题

时间:2013-03-18 07:19:03

标签: c# visual-studio-2008

我目前已经安装了Visual Studio 2008,版本9.0.30729.4462,我遇到了一些我认为已经链接的相当奇怪的问题。

1。在构建我的解决方案时,我在调试输出中得到5-10个这样的输出:

Project file contains ToolsVersion="4.0", which is not supported by this version of MSBuild. Treating the project as if it had ToolsVersion="3.5".

项目的所有.csproj文件都包含toolsversion="3.5"

2。尝试访问项目属性中的“安全”标签时,出现以下错误:

Visual Studio was unable to determine the Code Access Security (CAS) permissions that are applicable to your project. The most likely cause is that your project references a strongly-named assembly that defines custom permissions, but that is not properly installed in the global assembly cache (GAC). To correct this, try the following:

1. Ensure that any custom permissions defining assemblies referenced by your project have been properly installed to the GAC. If any of these assemblies have been rebuilt or have had their version numbers modified, you must install the new assemblies in the GAC.

2. Restart Visual Studio.

在这里寻找解决方案表明这通常是一个toolversion 4.0问题;但是,就像我说的,我的所有项目都在csproj文件中设置了3.5。

我应该从哪里开始排查?

1 个答案:

答案 0 :(得分:0)

这两个问题都与toolversion =“4.0”问题有关。我的解决方案中集成了很多项目,因此我在解决方案目录中搜索了“toolsversion =”。事实证明我的一些.csproj项目文件确实设置为4.0。一旦所有项目都设置为3.5,安全选项卡就会回来,编译时我没有收到任何错误。