Visual Studio 2012生成失败但错误列表中没有错误

kkk*_*kkk 5 c# build visual-studio-2012

我开始研究Visual Studio 2012专业版中的一个项目,该项目是用Visual Studio 2010 SP1编写的.在解决方案中有几个项目.在一个它们是一个问题,当我将它设置为启动项目我有消息:"There were build errors. Would you like to continue and run the last successful build?",但错误列表中没有错误(其他项目如果它们设置为启动,则构建成功).在VS2010中没有问题.

我看到的唯一问题是:在Properties -> Settings,我得到一个错误:

"Could not resolve mscorlib for target framework '. NETFramework, Version = v3.5'. This can happen if the target framework is not installed or if the framework moniker is incorrectly formatted."

Ger*_*ard 6

关闭VS2012并删除(隐藏).suo文件.删除该文件将解决问题.通过控制面板\外观和个性化\文件夹选项设置"显示隐藏文件".


gls*_*123 5

这可能由于多种原因而发生.要找出问题,请打开Visual Studio命令提示符并使用MSBuild构建项目或解决方案.

MSBuild <YourProject>.csproj
Run Code Online (Sandbox Code Playgroud)

要么

MSBuild <YourSolution>.sln
Run Code Online (Sandbox Code Playgroud)


SLa*_*aks 4

由于错误试图告诉您,您应该安装 .Net 3.5 或更改项目以针对您已安装的版本。