Simple WiX extension to resolve paths to installed NuGet packages.
Just install the Matthid.WiX.NuGetExtensions
package into your WiX project via NuGet.
You can use:
nuget.GetVersion(packName)
: Searchespackages.config
and*.*proj
files for package entries to detect the package version. Returns the first result.nuget.GetPath(packName)
: First detects the version (likeGetVersion
) then returns either the path to the nuget package cache (preferred) or a localpackages
directory.nuget.GetPath(packagesDir, packName)
: First detects the version (likeGetVersion
) then returns either the path to the nuget package cache (preferred) or the given localpackages
directory (use this if you use a non-standard package directory location).
<Property Id="FUNCTIONTEST" Value="$(nuget.GetPath(MyPackageName))/tools/Installer.msi" />
<Property Id="FUNCTIONTEST" Value="$(nuget.GetPath(MyPackageName))/tools/Installer_$(nuget.GetVersion(MyPackageName)).msi" />
- Run all tests in VS Test Runner
- Run
Version=1.0.0 dotnet pack -c Release wix-nuget-extension.sln