Re: [WiX-users] Checking for .NET version/existance

2008-02-18 Thread Geoff Finger
Whoops, it turns out that it was actually being installed twice in
different spots, once I updated _both_ spots to use the check
everything was fine. That's what i get for trying to debug stuff at
6pm without making sure i've checked all 5000 or so lines of code =P
(And perhaps I ought to pull those two references out into yet another
fragment or merge module)

Sorry bout that!

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Checking for .NET version/existance

2008-02-18 Thread Geoff Finger
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:






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/vse012070mrt/direct/01/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users