2
votes

I'm trying to use MSBuild.exe to build my Visual Studio 2017 based VSIX. I can't just build the solution as I don't want to build other projects in there. I tried using variations of the following command but these do not produce a VSIX file:

C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/MSBuild/15.0/Bin/MSBuild.exe" /v:normal /p:Configuration="Release" /p:Platform=AnyCPU /p:DeployExtension=false /target:Build "C:/code/Templates/Source/Boilerplate.Vsix/Boilerplate.Vsix.csproj

2
Did you add the Microsoft.VSSDK.BuildTools NuGet package to the VSIX project?ErikEJ
@ErikEJ It's a project template VSIX, so no.Muhammad Rehan Saeed

2 Answers

2
votes

The solution was to add the magic /p:VisualStudioVersion=15.0 parameter like so:

C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/MSBuild/15.0/Bin/MSBuild.exe /p:Configuration="Release" /p:DeployExtension=false /p:VisualStudioVersion=15.0 "C:/code/Templates/Source/Boilerplate.Vsix/Boilerplate.Vsix.csproj"

0
votes

go to your configuration manager and deselect the projects you do not want to build. (Right click you solution and chose configuration manager..). You can chose between release and debug in the top left as well.