MSBuild的命令行执行的Visual Studio 2010解决方案失败引用VS2010 SDK构建一个扩展 [英] MSBuild command line execution of Visual Studio 2010 Solution fails referencing VS2010 SDK to build an extension

查看:1504
本文介绍了MSBuild的命令行执行的Visual Studio 2010解决方案失败引用VS2010 SDK构建一个扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

场景

  • 解决方案已在它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:值不能为空。

额外的信息

  1. 在安装Visual Studio 2010 SP1 SDK
  2. 的路径和文件 Microsoft.VsSDK.Common.targets 确实存在。
  3. 我从 86 控制台和PowerShell窗口和 vcvarsall.bat(86)运行加载
  4. 在我不知道的 tmp_proj 是关于什么的。
  5. 这是一个WPF用户界面,是有什么我失踪通过的MSBuild编译一些与WPF / XAML
  6. 没有什么pre /后生成的csproj文件是扩展的事件。
  7. 在构建平台的目标是任何CPU
  8. 在我有其他的解决方案/用相同的的MSBuild 命令运作良好的项目。
  9. 设置 / 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...

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

  1. Visual Studio 2010 SDK SP1 is installed
  2. The path to and file Microsoft.VsSDK.Common.targets does exist.
  3. I'm running from an x86 console and PowerShell window and vcvarsall.bat (x86) are loaded
  4. I'm not sure what the tmp_proj is about.
  5. It's a WPF User Interface, is there something I'm missing to compile something with WPF/XAML via MSBuild?
  6. There is nothing pre/post build events of the CSProj file that is the extension.
  7. Build platform target is Any CPU
  8. I have other solutions/projects working well with the same MSBuild command.
  9. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆