Friday 2 November 2012

Microsoft.Common.targets (1360): Could not resolve this reference. Could not locate the assembly "Microsoft.Deployment.WindowsInstaller" on TFS Build Server

We have TFS 2010 running on a Win 2k8 R2 (i.e. a 64 bit OS) server and I made some changes to the build last night, including adding a new Custom Action project for Wix, kicked it off before I left and this morning I was greeted with this error:
c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1360): Could not resolve this reference. Could not locate the assembly "Microsoft.Deployment.WindowsInstaller". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
After a bit of googling I found the solution, a missing registry entry. It seems that by default the Wix installer adds the registry key to the Wow6432Node hive rather than the x64 hive, so all that is needed to make it work is to add the following registry key:
Windows Registry Editor Version 5.00 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\Wix 3.6]
@="C:\\Program Files (x86)\\WiX Toolset v3.6\\SDK\\"
I provided it as a script so that it can be copied and pasted (obviously change to your wix version). 

What I don't quite understand is how it worked before?

No comments:

Post a Comment