visual-studio 项目文件包含 ToolsVersion="4.0",此版本的 MSBuild 不支持
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1861013/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Project file contains ToolsVersion="4.0", which is not supported by this version of MSBuild
提问by Slee
How do I get rid of this error, I am using Visual Studio 2008 because 2010 wouldn't open some of my VB Projects.
我如何摆脱这个错误,我使用的是 Visual Studio 2008,因为 2010 不会打开我的一些 VB 项目。
回答by Steve Gilham
A VS2008 project file starts out with
一个 VS2008 项目文件以
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
where the ToolsVersion indicates the .net framework tools version. VS2010 uses .net 4, so clearly has made the corresponding change in its tools version.
其中 ToolsVersion 表示 .net 框架工具版本。VS2010 使用.net 4,所以很明显在它的工具版本上做了相应的改变。
I would expect that opening your project files in Notepad and resetting the tools version to 3.5 will clear that issue. Whether there are other backwards incompatibilities lurking, I couldn't say.
我希望在记事本中打开您的项目文件并将工具版本重置为 3.5 将清除该问题。是否还有其他向后不兼容的潜伏,我不能说。
回答by Christian
change the target framework to 3.5
将目标框架更改为 3.5
in project settings --> compile -->more options--> target framework
在 project settings --> compile -->more options--> target framework
回答by hanfei
Install Visual studio 2008 SP1,It will be ok!
安装Visual Studio 2008 SP1,就OK了!

