Reputation: 3
I have a custom installer based on WiX technology which is install three .vsix packages into Visual Studio 2012/2013. One of this packages is PostSharp - it needs NuGet Package Manager already installed in Visual Studio. The problem is that the Visual Studio 2013 has NuGet Package Manager by default, but Visual Studio 2012 hasn't.
So, I need to detect is NuGet Package Manager already installed in Visual Studio, and if not - install this package (.vsix) in my custom installer.
Is it possible in WiX ?
Upvotes: 0
Views: 640
Reputation: 26298
Yes, download the NugetPackageManager.vsix, and reference it in your WiX project:
<Component Id="VSPackageComponent" Guid="E54DBAAF-4961-492C-AA8A-FFE3C4C77BA3">
<VSExtension:VsixPackage File="VsPackageInstaller"
TargetVersion="11.0" <!-- VS2012 -->
PackageId="8cc311e8-5f48-4816-b1ee-6c873fe0dc71"
Vital="yes" Permanent="no" />
<File Id="VsPackageInstaller" Name="NugetPackageManager.vsix"
Source="NugetPackageManager.vsix"/>
</Component>
The magic is VsixPackage that does installation.
You will need to reference this DLL: C:\Program Files (x86)\WiX Toolset v3.8\bin\WixVSExtension.dll
, and declare this schema in your wxs file:
xmlns:VSExtension="http://schemas.microsoft.com/wix/VSExtension"
As far as the detection goes - I believe this should happen automatically with this approach. Give it a go, and report back :-)
Upvotes: 2