使用Visual Studio 2015构建.vdproj不会创建输出文件(.msi)

时间:2016-03-29 20:33:40

标签: visual-studio-2015 vdproj

我正在使用devenv构建vdproj。命令运行没有错误,但没有生成.msi文件的输出,我做错了什么?

devenv "C:\Projects\MyProj\Main\Src\MyProj\MyProj.sln" 
/build "'PRO VERSION|Mixed Platforms'" 
/project "C:\Projects\MyProj\Main\Src\MyProj\MyProj.Setup\MyProj.Setup.vdproj"
/projectconfig "'PRO VERSION|Mixed Platforms'"

我正在针对 Visual Studio 14.0 / Common7 / IDE / devenv

运行它

1 个答案:

答案 0 :(得分:0)

我能够通过添加以下注册表值来使其工作:

Try
{
    New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\VisualStudio\14.0_Config\MSBuild\" -Name "EnableOutOfProcBuild" -Value 00000000 -PropertyType DWORD -Force | Out-Null
}
Catch
{
    $ErrorMessage2 = $_.Exception.Message
    "ERROR adding 'EnableOutOfProcBuild' registry value, error: $ErrorMessage2"
}

然后运行以下:

$devenv = "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv";

    $config = "$ConfigurationMode|$Platform";
     & $devenv ($SolutionPath, "/project", $SetupProjectPath, "/build", "$config")