locked
How to install assembly in the GAC using MSI RRS feed

  • Question

  • User-257464031 posted

    Hi,

    How to install assembly in the GAC using MSI Installer?

    what steps i need to fallow?

     

    Monday, November 23, 2009 7:36 AM

Answers

  • User-68639941 posted

    hi,

    its actually very simple Create a setup project. Right click on the installer project and go to view --> file system Right click in the left pan and add global assembly cache folder click on the GAC folder and then in the right pane, right click and add assembly or project output (make sure all is strong named before adding otherwise the installer will fail).

    Refer : http://www.velocityreviews.com/forums/t78012-creating-a-setup-to-install-into-gac-where-can-i-find-an-example.html

    http://aspalliance.com/394_Installing_an_Assembly_in_GAC.all

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 23, 2009 11:26 PM
  • User-257464031 posted

    Hi Karthick,

    Thanks for your Post !. It Helps me to resolve my Problem.

    Steps Required to Install Assembly in GAC

    1)Open Visual Studio Command Prompt and Create a Strong Name file using

    C:\Program Files\Microsoft Visual Studio 9.0\VC>sn -k sample.snk

    After run this you can find a strong name file in VC Folder

    2) Copy & Past the strong name file in your Project for which you need to install to install in GAC with MSI File

    3)Add Refelection Namespace and Assembly Key file Attribute to your project file

     using System.Reflection;

     [assembly: AssemblyKeyFile("sample.snk")]

     namespace MyCustomAction

    {

    ...code here

    }

     

    4)Build it.Now Adding String Name to Your Assembly Part is done.

    5)Right click on the installer project and go to "view"

    6)Select "File System"

    7)Right Click on File System and Add Global Assembly Cache folder (see the below Image)

    8) After Adding GAC Folder Add Project Output to the folder as shown in below image

    8) Build & Install

    Thats it !!! It will Intstall "MyCustom" Assembly in GAC Folder.

    After Installing You can Find the Assembly in C:\WINDOWS\assembly

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, November 24, 2009 12:41 AM

All replies

  • User-68639941 posted

    hi,

    its actually very simple Create a setup project. Right click on the installer project and go to view --> file system Right click in the left pan and add global assembly cache folder click on the GAC folder and then in the right pane, right click and add assembly or project output (make sure all is strong named before adding otherwise the installer will fail).

    Refer : http://www.velocityreviews.com/forums/t78012-creating-a-setup-to-install-into-gac-where-can-i-find-an-example.html

    http://aspalliance.com/394_Installing_an_Assembly_in_GAC.all

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 23, 2009 11:26 PM
  • User-257464031 posted

    Hi Karthick,

    Thanks for your Post !. It Helps me to resolve my Problem.

    Steps Required to Install Assembly in GAC

    1)Open Visual Studio Command Prompt and Create a Strong Name file using

    C:\Program Files\Microsoft Visual Studio 9.0\VC>sn -k sample.snk

    After run this you can find a strong name file in VC Folder

    2) Copy & Past the strong name file in your Project for which you need to install to install in GAC with MSI File

    3)Add Refelection Namespace and Assembly Key file Attribute to your project file

     using System.Reflection;

     [assembly: AssemblyKeyFile("sample.snk")]

     namespace MyCustomAction

    {

    ...code here

    }

     

    4)Build it.Now Adding String Name to Your Assembly Part is done.

    5)Right click on the installer project and go to "view"

    6)Select "File System"

    7)Right Click on File System and Add Global Assembly Cache folder (see the below Image)

    8) After Adding GAC Folder Add Project Output to the folder as shown in below image

    8) Build & Install

    Thats it !!! It will Intstall "MyCustom" Assembly in GAC Folder.

    After Installing You can Find the Assembly in C:\WINDOWS\assembly

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, November 24, 2009 12:41 AM