MSI Build error with TFS Server & WiX

(This is a post migrated from Dotnetjunkies )

I found that my WiX 3.0 project was not building on my Team Foundation Server build machine.

For the benefit of search engines, the exact line was:

“light.exe(0,0): error LGHT0216: An unexpected Win32 exception with error code 0x659 occurred: This installation is forbidden by system policy. Contact your system administrator”

At first I thought that WiX was attempting to install on the server.. but after some digging I found out that it was just trying to run a verification of the MSI file.

Under my Windows 2003 machine the builder was a standard user with no permission to do this.

Therefore the resolution was to go into the properties of the WiX Project in Visual Studio, and click the ‘Advanced…’ button in the ‘Linker’ tab.

(By the way, you may need to resize your screen a bit for this button to refresh and show up)

In the resultant window, select the ‘Supress MSI/MSM validation’ under the ‘Suppresions’ tab.

Everything should work fine now 🙂 I guess the next question would be.. what to do when you need a validation of your MSI? I guess this is a good case for running build as an administrator under an XP box.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s