Discussion:
[WiX-users] How to GAC .Net assemblies the correct way?
Wong Shao Voon
2008-10-08 09:54:38 UTC
Permalink
Hey guys,

I could use a custom action to gacutil the .Net dlls into the GAC. But I searched that WiX and MSI has the correct way of GAC'ing the dlls, instead of using gacutil.exe . After I googled, I still couldn't find a single example on how to do it. Could someone kind enough to enlighten me the correct way to specify it in the WXS file?

Thank you very much!

And have a nice day!

Best regards,
Shao Voon
Eitan Behar
2008-10-08 10:13:15 UTC
Permalink
Very simple, just use the file property Assembly=".net" that way the file
will go to the GAC regardless of its position in the directory tree. Notice
that if you want the DLL also in Program Files\YourApp\bin, you need another
component.



-----Original Message-----
From: Wong Shao Voon [mailto:***@yahoo.com]
Sent: Wednesday, October 08, 2008 11:55 AM
To: wix-***@lists.sourceforge.net
Subject: [WiX-users] How to GAC .Net assemblies the correct way?

Hey guys,

I could use a custom action to gacutil the .Net dlls into the GAC. But I
searched that WiX and MSI has the correct way of GAC'ing the dlls, instead
of using gacutil.exe . After I googled, I still couldn't find a single
example on how to do it. Could someone kind enough to enlighten me the
correct way to specify it in the WXS file?

Thank you very much!

And have a nice day!

Best regards,
Shao Voon




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
lesterbangs
2009-03-17 21:19:35 UTC
Permalink
Using WiX 3.0.5106.0, I'm not seeing this behavior; Inside a fragment, I am
specifying file entries under a directory ref like so:

<DirectoryRef Id="MyFolder">
<Component Id="MyAssembly">
<File Id="FirstAssemblyName.dll" KeyPath="yes"
Source="$(var.BuildSourcePath)\FirstAssemblyName.dll" Assembly=".net">
</Component>
<Component Id="MyOtherAssembly">
<File Id="SecondAssemblyName.dll" KeyPath="yes"
Source="$(var.BuildSourcePath)\SecondAssemblyName.dll" Assembly=".net">
</Component>
etc...
</DirectoryRef>


When the product is installed, the assemblies appear in both MyFolder, and
the GAC. This is contrary to what Eitan is saying (Assemblies are installed
to the GAC regardless of their position in the directory tree).

The way it behaves now (installs into MyFolder AND the GAC) is actually the
desired behavior for this product but I want to make sure I'm specifying the
entries correctly and its not a fortuitous side-effect of me writing an
incorrect WiX file.

Thanks.
Post by Eitan Behar
Very simple, just use the file property Assembly=".net" that way the file
will go to the GAC regardless of its position in the directory tree. Notice
that if you want the DLL also in Program Files\YourApp\bin, you need another
component.
-----Original Message-----
Sent: Wednesday, October 08, 2008 11:55 AM
Subject: [WiX-users] How to GAC .Net assemblies the correct way?
Hey guys,
I could use a custom action to gacutil the .Net dlls into the GAC. But I
searched that WiX and MSI has the correct way of GAC'ing the dlls, instead
of using gacutil.exe . After I googled, I still couldn't find a single
example on how to do it. Could someone kind enough to enlighten me the
correct way to specify it in the WXS file?
Thank you very much!
And have a nice day!
Best regards,
Shao Voon
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
https://lists.sourceforge.net/lists/listinfo/wix-users
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
https://lists.sourceforge.net/lists/listinfo/wix-users
--
View this message in context: http://n2.nabble.com/How-to-GAC-.Net-assemblies-the-correct-way--tp1306183p2493902.html
Sent from the wix-users mailing list archive at Nabble.com.
Neil Enns
2008-10-08 14:07:28 UTC
Permalink
There is a complete example of how to do this in the WiX help file that ships with WiX. Look under the How To section.

Neil

________________________________
From: Wong Shao Voon [***@yahoo.com]
Sent: Wednesday, October 08, 2008 2:54 AM
To: wix-***@lists.sourceforge.net
Subject: [WiX-users] How to GAC .Net assemblies the correct way?

Hey guys,

I could use a custom action to gacutil the .Net dlls into the GAC. But I searched that WiX and MSI has the correct way of GAC'ing the dlls, instead of using gacutil.exe . After I googled, I still couldn't find a single example on how to do it. Could someone kind enough to enlighten me the correct way to specify it in the WXS file?

Thank you very much!

And have a nice day!

Best regards,
Shao Voon




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Robert O'Brien
2008-11-18 11:58:01 UTC
Permalink
I looked under the current wix help file how to section and could only find "How To: NGen Managed Assemblies During Installation".

This appears to cover having wix generated msi's install/uninstall to %systemroot%\assembly\gac_32 & %systemroot%\assembly\gac_64 but does not appear to have an option to all me to direct install to %systemroot%\assembly\gac_msil.

Am I overlooking some <netfx:NativeImage attribute setting that will result in bits getting placed in %systemroot%\assembly\gac_msil?

-----Original Message-----
From: Neil Enns [mailto:***@microsoft.com]
Sent: Wednesday, October 08, 2008 7:07 AM
To: ***@yahoo.com; General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to GAC .Net assemblies the correct way?

There is a complete example of how to do this in the WiX help file that ships with WiX. Look under the How To section.

Neil

________________________________
From: Wong Shao Voon [***@yahoo.com]
Sent: Wednesday, October 08, 2008 2:54 AM
To: wix-***@lists.sourceforge.net
Subject: [WiX-users] How to GAC .Net assemblies the correct way?

Hey guys,

I could use a custom action to gacutil the .Net dlls into the GAC. But I searched that WiX and MSI has the correct way of GAC'ing the dlls, instead of using gacutil.exe . After I googled, I still couldn't find a single example on how to do it. Could someone kind enough to enlighten me the correct way to specify it in the WXS file?

Thank you very much!

And have a nice day!

Best regards,
Shao Voon




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Rob Mensching
2008-11-18 16:06:35 UTC
Permalink
Yeah, you have to search for "global assembly cache" in the WiX.chm to find it. "GAC" only finds the NativeImage element. Probably should tweak the documentation to catch both.

-----Original Message-----
From: Robert O'Brien [mailto:***@microsoft.com]
Sent: Tuesday, November 18, 2008 03:58
To: 'General discussion for Windows Installer XML toolset.'; '***@yahoo.com'
Subject: Re: [WiX-users] How to GAC .Net assemblies the correct way?

I looked under the current wix help file how to section and could only find "How To: NGen Managed Assemblies During Installation".

This appears to cover having wix generated msi's install/uninstall to %systemroot%\assembly\gac_32 & %systemroot%\assembly\gac_64 but does not appear to have an option to all me to direct install to %systemroot%\assembly\gac_msil.

Am I overlooking some <netfx:NativeImage attribute setting that will result in bits getting placed in %systemroot%\assembly\gac_msil?

-----Original Message-----
From: Neil Enns [mailto:***@microsoft.com]
Sent: Wednesday, October 08, 2008 7:07 AM
To: ***@yahoo.com; General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to GAC .Net assemblies the correct way?

There is a complete example of how to do this in the WiX help file that ships with WiX. Look under the How To section.

Neil

________________________________
From: Wong Shao Voon [***@yahoo.com]
Sent: Wednesday, October 08, 2008 2:54 AM
To: wix-***@lists.sourceforge.net
Subject: [WiX-users] How to GAC .Net assemblies the correct way?

Hey guys,

I could use a custom action to gacutil the .Net dlls into the GAC. But I searched that WiX and MSI has the correct way of GAC'ing the dlls, instead of using gacutil.exe . After I googled, I still couldn't find a single example on how to do it. Could someone kind enough to enlighten me the correct way to specify it in the WXS file?

Thank you very much!

And have a nice day!

Best regards,
Shao Voon




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Robert O'Brien
2008-11-18 17:58:01 UTC
Permalink
Thanks. Wix.chm | search "global assembly cache" -> returned one hit for "File Element" documentation which did detail use of the Assembly attribute for install/remove of managed dlls in %systemroot%\assembly\gac_msil. So the addition of just Assembly and KeyPath to File element as shown here did the trick for me.

<Component Id="gacitem1" Guid="PUT-GUID-HERE" Win64="$(var.Win64)">
<File Id="SomeGacDestinedItem.dll" Name="Company.Deliverable.SomeGacDestinedItem.dll" Source="$(var.SomeGacDestinedItem.TargetPath)" Assembly=".net" KeyPath="yes" />
</Component>

-----Original Message-----
From: Rob Mensching [mailto:***@microsoft.com]
Sent: Tuesday, November 18, 2008 8:07 AM
To: General discussion for Windows Installer XML toolset.; '***@yahoo.com'
Subject: Re: [WiX-users] How to GAC .Net assemblies the correct way?

Yeah, you have to search for "global assembly cache" in the WiX.chm to find it. "GAC" only finds the NativeImage element. Probably should tweak the documentation to catch both.

-----Original Message-----
From: Robert O'Brien [mailto:***@microsoft.com]
Sent: Tuesday, November 18, 2008 03:58
To: 'General discussion for Windows Installer XML toolset.'; '***@yahoo.com'
Subject: Re: [WiX-users] How to GAC .Net assemblies the correct way?

I looked under the current wix help file how to section and could only find "How To: NGen Managed Assemblies During Installation".

This appears to cover having wix generated msi's install/uninstall to %systemroot%\assembly\gac_32 & %systemroot%\assembly\gac_64 but does not appear to have an option to all me to direct install to %systemroot%\assembly\gac_msil.

Am I overlooking some <netfx:NativeImage attribute setting that will result in bits getting placed in %systemroot%\assembly\gac_msil?

-----Original Message-----
From: Neil Enns [mailto:***@microsoft.com]
Sent: Wednesday, October 08, 2008 7:07 AM
To: ***@yahoo.com; General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to GAC .Net assemblies the correct way?

There is a complete example of how to do this in the WiX help file that ships with WiX. Look under the How To section.

Neil

________________________________
From: Wong Shao Voon [***@yahoo.com]
Sent: Wednesday, October 08, 2008 2:54 AM
To: wix-***@lists.sourceforge.net
Subject: [WiX-users] How to GAC .Net assemblies the correct way?

Hey guys,

I could use a custom action to gacutil the .Net dlls into the GAC. But I searched that WiX and MSI has the correct way of GAC'ing the dlls, instead of using gacutil.exe . After I googled, I still couldn't find a single example on how to do it. Could someone kind enough to enlighten me the correct way to specify it in the WXS file?

Thank you very much!

And have a nice day!

Best regards,
Shao Voon




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Continue reading on narkive:
Loading...