The program I'm installing has an Interop we'd like to install on systems using .NET, but we still want to be able to install the program with reduced functionality on systems without .NET. However when we tried installing it on such a system we got an error because it tried to add the interop to a nonexistant Windows\assembly directory. So I added a condition to check the version of .NET installed and make sure it was greater than or equal to .NET 1.0, as follows:
<Component Id="InteropSOLibToGAC" Guid="MyGuidHere"> <File Id="InteropSOLibFile" Name="IpSO.dll" LongName="Interop.SOLib.dll" KeyPath="yes" src="..\..\Source\Build\Win32\Release\Interop.SOLib.dll" Assembly=".net" /> <Condition><![CDATA[MsiNetAssemblySupport >= "1.0.3705"]]></Condition> </Component> I figured if .NET wasn't installed that should return false and kill component. So to test it I grabbed a test machine and uninstalled all the .NET components, but when I ran the installation it tried to install the interop anyways. When I checked the log file I found the following: MSI (c) (C4:C8) [17:11:22:825]: Note: 1: 1935 2: {MyGuidHere} 3: 0x80004005 4: 5: CreateAssemblyCache 6: Interop.SOLib,version="7.0.0.0",processorArchitecture="MSIL",publicKeyToken="507ED33EA22D1100",culture="neutral" MSI (c) (C4:C8) [17:11:22:825]: ignoring fusion interface error, assuming we are bootstrapping (MsiNetAssemblySupport is unset) followed a little later by: MSI (s) (D8:7C) [17:12:00:949]: Assembly Error:Function not defined in specified DLL. MSI (s) (D8:7C) [17:12:00:949]: Note: 1: 1935 2: {MyGuidHere} 3: 0x8002802F 4: 5: CreateAssemblyNameObject 6: Interop.SOLib,version="7.0.0.0",processorArchitecture="MSIL",publicKeyToken="507ED33EA22D1100",culture="neutral" Error 1935. An error occured during the installation of assembly component {MyGuidHere}}. HRESULT: 0x8002802F. assembly interface: , function: CreateAssemblyNameObject, assembly name: Interop.SOLib,version="7.0.0.0",processorArchitecture="MSIL",publicKeyToken="507ED33EA22D1100",culture="neutral" MSI (s) (D8:7C) [17:13:03:975]: Product: Server 7.0 -- Error 1935. An error occured during the installation of assembly component {MyGuidHere}. HRESULT: 0x8002802F. assembly interface: , function: CreateAssemblyNameObject, assembly name: Interop.SOLib,version="7.0.0.0",processorArchitecture="MSIL",publicKeyToken="507ED33EA22D1100",culture="neutral" If it failed to be able to access the fusion interface then why did the condition pass? Is this some kind of weirdness because .NET was installed on the system once and then uninstalled, or will the same thing happen on a completely clean machine? And is there any way to force it to fail in that circumstance using the MsiNetAssemblySupport call or something similar? If not I think my alternatives are either to check for the existence of the windows\assembly directory directly or check the registry to see if the .NET keys are there, but neither of those solutions seems ideal. Thanks! ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users