Visual Studio 2012错误MSB3073

时间:2013-01-25 21:40:15

标签: c++ visual-studio msbuild

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

有什么建议吗?任何帮助都会非常感激我完全被卡住了

1 个答案:

答案 0 :(得分:0)

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

如果以上工作正常,请在执行devenv.exe或msbuild.exe之前从命令提示符执行2010 vcvars.bat。