我正在尝试仅将我的IDE(而不是编译器)从Visual Studio 2010升级到2012。

Error 9 error MSB3073: The command ""C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\..\IDE\devenv" mdlibs.sln /Build "Release|x64"" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.MakeFile.Targets 38 lib_mdlibs (Visual Studio 2008)

它将我定向到此代码

 <Target Name="Build"
     DependsOnTargets="PrepareForNMakeBuild;ResolveReferences;GetTargetPath"
     Returns="$(NMakeManagedOutput)">

    <VCMessage Code="MSB8005" Type="Warning" Arguments="NMakeBuildCommandLine"
          Condition="'$(NMakeBuildCommandLine)'==''"/>

    <Exec Command="$(NMakeBuildCommandLine)"
          Condition="'$(NMakeBuildCommandLine)'!=''"/>
 </Target>


特别是倒数第二行

我不知道该如何处理!我已经尝试了一些方法,但到目前为止没有任何效果

当我只构建lib_mdlibs时,它说
操作无法完成

1>
1>  Use:
1>  devenv  [solutionfile | projectfile | anyfile.ext]  [switches]
1>
1>  The first argument for devenv is usually a solution file or project file.
1>  You can also use any other file as the first argument if you want to have the
1>  file open automatically in an editor. When you enter a project file, the IDE
1>  looks for an .sln file with the same base name as the project file in the
1>  parent directory for the project file. If no such .sln file exists, then the
1>  IDE looks for a single .sln file that references the project. If no such single
1>  .sln file exists, then the IDE creates an unsaved solution with a default .sln
1>  file name that has the same base name as the project file.


我以为可能是我的命令行构建

"$(VS110COMNTOOLS)..\IDE\devenv" mdlibs.sln /Build "$(Configuration)|$(Platform)"

但我尝试过几次更改,但没有任何帮助

我尝试在vs2012中打开仅mdlibs解决方案并进行构建,但是当我尝试构建它时,出现一个弹出窗口,提示项目文件''已被重命名或不再存在于解决方案中

或者,如果我尝试在mdlibs.sln中构建任何单个项目,则它说无法执行请求的操作,因为即使我刚刚打开了解决方案,构建仍在进行中

有什么建议么?任何帮助都将不胜感激,我完全被困住了

最佳答案

这很可能是因为vc11 vcvars获得默认设置。转到VS2010-> VS工具-> VS命令提示符(2010),然后在此处执行命令。

如果上述方法可行,请在执行devenv.exe或msbuild.exe之前从命令提示符处执行2010 vcvars.bat。

08-27 02:53