Nick Josevski
Nick Josevski

Reputation: 4216

MSBuild command line execution of Visual Studio 2010 Solution fails referencing VS2010 SDK to build an extension

Scenario

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?

Upvotes: 3

Views: 2373

Answers (1)

Sean Holm
Sean Holm

Reputation: 329

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.

Upvotes: 2

Related Questions