Re: deployment of a .NET DLL

From: Bob Powell [MVP] (bob_at__spamkiller_bobpowell.net)
Date: 05/13/04


Date: Thu, 13 May 2004 22:54:29 +0200

Hi,
You don't need to redistribute gacutil because the .net framework, which has
that in it, must be installed before you install your application.

The deployment project in Visual Studio has the ability to install
assemblies into the GAC for you. Right click the "File System On Target
Machine" root node and select "Add Special Folder" then select "Global
Assembly Cache Folder"

The installer will automatically place the DLL in the GAC for you.

To strongly name the DLL, create a key by running the Visual Studio Command
Prompt which can be found in the VS menu in your start bar. Use the command
line:

sn -k <keyfile>.snk

A key file will be generated..

Then, in the AssemblyInfo.cs file, edit the assembly: AssemblyKeyFile entry
to include the path to your key file. such as..

[assembly: AssemblyKeyFile("c:\mykeyfile.snk")]

The DLL will be built as a signed assembly.

There is a great guide to this in MSDN which you can find online or in the
Visual Studio help called "Creating and Using Strong-Named Assemblies"

-- 
Bob Powell [MVP]
Visual C#, System.Drawing
Image transition effects, automatic persistent configuration and
design time mouse operations all in April's issue of Well Formed
http://www.bobpowell.net/wellformed.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm
The GDI+ FAQ RSS feed: http://www.bobpowell.net/faqfeed.xml
Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tipstricks.xml
Bob's Blog: http://royo.is-a-geek.com/siteFeeder/GetFeed.aspx?FeedId=41
"songie D" <songie@d.com> wrote in message
news:%23YZ5EkROEHA.540@TK2MSFTNGP11.phx.gbl...
>
> > 1. http://samples.gotdotnet.com/quickstart/howto/doc/gac.aspx
> >
> > 2. Dont know. Sorry
> >
> > 3. Yes. Gacutil is provided in the .NET framework SDK as is the SN
> utility.
>
> Is it redistributable? What I'm getting at, is that Inno is the method I
> would
> be using to deploy my C# program as it has quite powerful features.
> So, would I be able to put gacutil.exe in my package, and configure it
> such that it would extract the .NET framework, install that, then extract
> gacutil.exe, and then subsequently cause it to install the DLL?
> i.e. more a question of would I be allowed to, I'm sure I could work out
> how to. Surely others have run into this problem, is there not a good
> documented
> method or anything? I'll check the website you gave me though...
>
> And how do I 'strongly name' the DLL? (using 'SN' utility? how do I access
> that?)
>
>
> >
> > -- 
> > Bob Powell [MVP]
> > Visual C#, System.Drawing
> >
> > Image transition effects, automatic persistent configuration and
> > design time mouse operations all in April's issue of Well Formed
> > http://www.bobpowell.net/wellformed.htm
> >
> > Answer those GDI+ questions with the GDI+ FAQ
> > http://www.bobpowell.net/gdiplus_faq.htm
> >
> > The GDI+ FAQ RSS feed: http://www.bobpowell.net/faqfeed.xml
> > Windows Forms Tips and Tricks RSS:
http://www.bobpowell.net/tipstricks.xml
> > Bob's Blog: http://royo.is-a-geek.com/siteFeeder/GetFeed.aspx?FeedId=41
> >
> >
> >
> >
> >
> > "songie D" <anonymous@discussions.microsoft.com> wrote in message
> > news:3EAF3528-AC3F-44B5-BC0B-69A2DD1A736B@microsoft.com...
> > > 1) Is there a simple tutorial on using gacutil.exe ?
> > >
> > > 2) Can gacutil.exe be made to work with Inno setup creator?
> > >
> > > 3) Does installing the .NET framework mean that you've got
gacutil.exe?
> >
> >
>
>


Relevant Pages

  • Re: GDI+ Deployment and Windows XP
    ... For NonXP systems install the dll in the app directory. ... It should be the same version of GDI+ regardless of OS. ... Windows, System, and App directory and when it finds the dll it uses it. ...
    (microsoft.public.win32.programmer.gdi)
  • Re: Namespace Question
    ... I think that now my understanding about the namespace, GUC and compilation ... >>used to install production assemblies into the global assembly cache. ... > developed a dll, if we have made a product and the product will use the ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Windows Service Install Project
    ... that starts Services that have references to assemblies in the GAC. ... Visual Studio Setup project? ... break my system when I go to install. ...
    (microsoft.public.dotnet.framework.setup)
  • Re: I have seen some fat client Dot Net apps
    ... How do you install the CF SDK if you don't have VS? ... install CF on a device was to write a trivial CF app in VS and install ... "Borland does not have license to ship the CF assemblies. ... assemblies and run the app unchanged on the CF platform. ...
    (borland.public.delphi.non-technical)
  • Re: iisreset? why does this work?
    ... To give you another thing about the assemblies... ... appliations that use them. ... What matters is that when the web site is completely removed and even ... assemblies do not have problems with the install. ...
    (microsoft.public.dotnet.framework.aspnet)