1

我正在尝试只升级我的 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 中构建任何单个项目,它会说无法执行请求的操作,因为构建已经在进行中,即使我刚刚打开了解决方案

有什么建议么?任何帮助都将不胜感激我完全陷入困境

4

1 回答 1

0

这很可能是因为 vc11 vcvars 是默认设置的。转到 VS2010 -> VS Tools -> VS Command Prompt (2010) & 然后在那里执行你的命令。

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

于 2014-07-10T21:00:47.533 回答