Windows容器无法生成VS 2013 C ++项目,出现错误MSB6006:“midl.exe”退出,代码为-2147024774

我应该能够使用MSBuild.exe在Windows泊坞窗容器上build立一个C ++项目

命令:

C:\'Program Files (x86)'\MSBuild\12.0\Bin\MSBuild.exe .\TestNative.sln /p:Configuration=Release /p:Platform=x64 /m /t:Build /p:ResGenExecuteAsTool=true /toolsversion:12.0 

C ++项目无法生成错误:

 Midl: C:\Program Files (x86)\Windows Kits\8.1\bin\x86\midl.exe /W1 /nologo /char signed /env x64 /h “Enumglob.h” /tlb “x64\ReleaseMinDependency\TestNativeCore.tlb” Enumglob.idl 64 bit Processing .\Enumglob.idl C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(1178,5): error MSB6006: “midl.exe” exited with code -2147024774. 

….

….

build立失败。

信息

这是我的Dockerfile,它已经安装了Visual C ++ Redistributable,并使用Docker cp命令复制了项目。 我不知道还有什么遗漏,错误信息是没有帮助的。

 FROM chemsorly/msbuilder:1.0.0-vsc SHELL ["powershell"] # Download VC++ 2010 SP1 Redistributable Package (x64) RUN Invoke-WebRequest http://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x64.exe -OutFile "$env:TEMP\vc2010x64.exe" -UseBasicParsing RUN Start-Process "$env:TEMP\vc2010x64.exe" '/features + /q' -wait RUN Remove-Item "$env:TEMP\vc2010x64.exe" # Download VC++ 2012 Update 4 Redistributable Package (x64) RUN Invoke-WebRequest http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe -OutFile "$env:TEMP\vc2012x64.exe" -UseBasicParsing RUN Start-Process "$env:TEMP\vc2012x64.exe" '/features + /q' -wait RUN Remove-Item "$env:TEMP\vc2012x64.exe" # Download VC++ 2013 Redistributable Package (x64) RUN Invoke-WebRequest http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe -OutFile "$env:TEMP\vc2013x64.exe" -UseBasicParsing RUN Start-Process "$env:TEMP\vc2013x64.exe" '/features + /q' -wait RUN Remove-Item "$env:TEMP\vc2013x64.exe" # Note: Add MSBuild to path RUN setx PATH '%PATH%;C:\\Program Files (x86)\\MSBuild\\14.0\\Bin' # Download VC++ 2015 Build Tools RUN Invoke-WebRequest 'http://go.microsoft.com/fwlink/?LinkId=691126"&"fixForIE=.exe"&"__hstc=268264337.f43737e851d862336312053b3a368915.1511781465043.1511781465043.1511781465043.1"&"__hssc=268264337.1.1511781465043"&"__hsfp=1781426681' -OutFile "$env:TEMP\vc++2015bt.exe" -UseBasicParsing RUN Start-Process "$env:TEMP\vc++2015bt.exe" '/features + /q' -wait 

问题 :我不确定我的容器上缺less什么工具, 那么上面的错误是怎么解决的