2013-03-18 237 views
0

我目前已經安裝了Visual Studio 2008,版本9.0.30729.4462,我遇到了一些相當奇怪的問題,我相信這些問題都是鏈接的。Visual Studio 2008版本問題

在構建我的解決方案,我得到的調試輸出,這些輸出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.

在這裏尋找解決方案表明這是一個典型的toolsversion 4.0問題;然而,就像我所說的,我所有的項目都在csproj文件中設置了3.5。

我應該從哪裏開始排除故障?

回答

0

這兩個問題都與toolsversion =「4.0」問題有關。我的解決方案中集成了大量項目,因此我在解決方案目錄中搜索了「toolsversion =」。事實證明,我的一些.csproj項目文件確實設置爲4.0。一旦所有項目都設置爲3.5,安全選項卡就會回來,編譯時我沒有收到任何更多的錯誤。