MSBuild的命令行执行的Visual Studio 2010解决方案失败引用VS2010 SDK构建一个扩展 [英] MSBuild command line execution of Visual Studio 2010 Solution fails referencing VS2010 SDK to build an extension
问题描述
场景
- 解决方案已在它VS2010扩展(.NET 4类库,用WPF UI)
- 在它建立精美Visual Studio内部的
- 在同一台机器当我试图通过命令行来构建它(作为构建脚本的一部分)
- 失败使用此命令,尝试构建它的时候:
-
的MSBuild JsExt.sln /吨:构建/号码:配置=调试/号码:OUTDIR = .. \ .. \二进制文件
-
- 更新
- 要
的MSBuild
添加/属性:VsSDKInstall =C:\ Program Files文件(x86)的\的MSBuild \微软\ VisualStudio中\ 10.0 \ VSSDK
导致这个例外...
- 要
异常
在VSCTCompiler任务意外失败。 C:\ Program Files文件(x86)的\的MSBuild \微软\ VisualStudio中\ 10.0 \ VSSDK \ Microsoft.VsSDK.Common.targets(74,5):错误MSB4018: System.ArgumentNullException:值不能为空。
额外的信息
- 在安装Visual Studio 2010 SP1 SDK
- 的路径和文件
Microsoft.VsSDK.Common.targets
确实存在。 - 我从
86
控制台和PowerShell窗口和vcvarsall.bat(86)
运行加载 - 在我不知道的
tmp_proj
是关于什么的。 - 这是一个WPF用户界面,是有什么我失踪通过的MSBuild编译一些与WPF / XAML ?
- 没有什么pre /后生成的csproj文件是扩展的事件。
- 在构建平台的目标是
任何CPU
- 在我有其他的解决方案/用相同的
的MSBuild
命令运作良好的项目。 - 设置
/ V:诊断
不提供有关错误的更多信息 。
任何想法,我缺少什么,接下来会发生什么调试?
是VSSDKInstall ENV变量设置/显示在控制台中了?
VSSDK100Install = C:\ Program Files文件(x86)的\微软的Visual Studio 2010 SDK SP1 \
如果是这样,那么添加/ V:诊断。你CMD网上看到什么轮番上涨
看看下面的<一个href="http://blogs.msdn.com/b/aaronmar/archive/2011/05/10/visual-studio-extensions-and-build-servers.aspx"相对=nofollow称号=博客文章>博客文章 - 第3步听起来像你原来的问题,和步骤#4解释说,你刚才遇到的后续VSCTCompiler问题
Scenario
- Solution that has a VS2010 extension in it (.NET 4 Class library, with a WPF UI)
- It builds fine inside visual studio
- On the same machine when I attempt to build it via command line (as part of a build script)
- Fails when using this command to attempt to build it:
msbuild JsExt.sln /t:Build /p:Configuration=Debug /p:OutDir=..\..\Binaries
- Update
- To
MSBuild
Adding/property:VsSDKInstall="C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\VSSDK"
leads to this exception...
- To
Exception
The "VSCTCompiler" task failed unexpectedly. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\VSSDK\Microsoft.VsSDK.Common.targets(74,5): error MSB4018: System.ArgumentNullException: Value cannot be null.
Extra info
- Visual Studio 2010 SDK SP1 is installed
- The path to and file
Microsoft.VsSDK.Common.targets
does exist. - I'm running from an
x86
console and PowerShell window andvcvarsall.bat (x86)
are loaded - I'm not sure what the
tmp_proj
is about. - It's a WPF User Interface, is there something I'm missing to compile something with WPF/XAML via MSBuild?
- There is nothing pre/post build events of the CSProj file that is the extension.
- Build platform target is
Any CPU
- I have other solutions/projects working well with the same
MSBuild
command. - Setting
/v:diag
doesn't offer much more information on the errors.
Any ideas, what am I missing, what's next to debug?
Is the VSSDKInstall env variable set / showing up in your console?
VSSDK100Install=C:\Program Files (x86)\Microsoft Visual Studio 2010 SDK SP1\
If so, then add "/v:diag" to your cmd line to see what that turns up.
Take a look at the following blog post - step #3 sounds like your original issue, and step #4 explains the subsequent VSCTCompiler issue that you just encountered.
这篇关于MSBuild的命令行执行的Visual Studio 2010解决方案失败引用VS2010 SDK构建一个扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!