Build/Test Issues

Cannot build VSIX package in Visual Studio 2017

Started by PeterGerrard on 5,490 views

Hi,

I have an issue when building a VSIX package in Visual Studio 2017

Reproduction Steps:
NCrunch Version: 3.6.0.2
Visual Studio 2017: 15.0.0+26228.9

- Create a new VSIX package project
- Let NCrunch build it
Visual Studio can build it

Expected Outcome:
It Builds

Actual Outcome:
Get Error Message

..\..\..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\VSSDK\Microsoft.VsSDK.targets (90, 5): The "ValidateVsixManifest" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Setup.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.Setup.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Microsoft.VsSDK.Build.Tasks.ValidateVsixManifestUtilities.ValidateVsix(TaskLoggingHelper log, String manifestToValidate, String vsixSchemaPath, Boolean validateEverything, String& name, String& id)
at Microsoft.VsSDK.Build.Tasks.ValidateVsixManifest.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()


Any help on getting this sorted. would be appreciated.
Nb. This is different to the main error I'm getting in my main solution, but I can't reproduce that simply with the current issue.




Peter Gerrard
Hi Peter,

This looks to be an error thrown by a VSIX validation step in your build process. Probably this step isn't needed for NCrunch to run tests over the assembly, so it may be worth disabling it by specifying a condition on the <Import> used to include it in your build system, for example:

<Import Project="PathToVSSDK\Microsoft.VsSDK.targets" Condition="'$(NCrunch)' != '1'" />

It may also be possible to get this working by turning on the 'Copy referenced assemblies to workspace' setting for the projects involved, though I'd recommend avoiding this if possible as it will inhibit your performance.
Hi,

Including
<Import Project="PathToVSSDK\Microsoft.VsSDK.targets" Condition="'$(NCrunch)' != '1'" />
has worked around the issue for now. And the tests have successfully run in NCrunch.


Thanks,



Peter
Great to hear. This will also improve your build performance under NCrunch.

Post a reply

Log in to reply.