Josh Kodroff
Josh Kodroff

Reputation: 28141

Where is Microsoft.Deployment.WindowsInstaller found?

I'm trying to compile a WiX installer (which has custom actions, which I suspect are the source of the issue) on a build server and I'm getting the following error:

  c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3245: Could not resolve
this reference. Could not locate the assembly "Microsoft.Deployment.WindowsInstaller, Version=3.0.0.0, Culture=neutral,
 PublicKeyToken=ce35f76fcda82bad, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this
reference is required by your code, you may get compilation errors. [C:\code\rms1-moverssuite\src\RMSS.Setup.CustomActi
ons\RMSS.Setup.CustomActions.csproj]

Any idea what needs to be installed? I vaguely remember that I had to install something from the Windows SDK last time I did this, but can't remember what it was.

Upvotes: 38

Views: 36097

Answers (4)

Christopher Painter
Christopher Painter

Reputation: 55601

It's part of Windows Installer XML (WiX) an open source project formerly from Microsoft but since transferred to the Outercurve Foundation. It can be found on CodePlex. 3.7 is the latest release.

This interop assembly is part of Deployment Tools Foundation (DTF) and you'll find an SDK help file installed in the start menu. The actual assembly will be found in C:\Program Files (x86)\WiX Toolset v3.7\SDK.

Update 5/10/2023-

As part of WiX Toolset's migration to Nuget and ProjectStyle SDKs, this assembly has been renamed to WixToolset.Dtf.WindowsInstaller and is available via Nuget.

https://www.nuget.org/packages/WixToolset.Dtf.WindowsInstaller

Upvotes: 46

Bart Tyla
Bart Tyla

Reputation: 86

For me this was just a matter of providing a hint for the reference in cproj file, pointing to the Wix nuget package.

<Reference Include="Microsoft.Deployment.WindowsInstaller"> 
 <HintPath>..\packages\WiX.3.11.2\tools\Microsoft.Deployment.WindowsInstaller.dll</HintPath>
</Reference>

Upvotes: 6

v.t.
v.t.

Reputation: 111

You have to create a Custom Action Project and refer it to your installer. That will locate the assembly Microsoft.Deployment.WindowsInstaller.

Custom Action Project

Upvotes: 0

RBT
RBT

Reputation: 25937

I downloaded WiX v3.11 from official website which eventually lands to this git hub page. The set up is actually an executable (*.exe) rather an MSI which shows you this installation page:

enter image description here

Just click on the install gear icon. Once installation completes select the reference to Microsoft.Deployment.WindowsInstaller in Visual Studio solution explorer and click refresh from toolbar.

Upvotes: 5

Related Questions