How to add to the base class library?

Suppose I have a simple class that I use so frequently that I don't want to have to add a referency to it for each new project, but wrather have it act as if it were part of the base class library. Is there a way to do this

I realize that I could create a code snippet but I would wrather not have to see the code in my projects.

Thanks,

SteveJ




Answer this question

How to add to the base class library?

  • LeylaBora

    You need to create a class library application. This will make a dll you can add as a reference to your application


  • Sajay Antony - MSFT

    You could install your dll in the GAC...but you will still have to make project level references...All base classes(that are used by your project) still need to be referenced by your project...It's done by default on common/neccessary classes when you choose a new project!

  • Bitla

    You can also use gacutil.exe


  • sudkot

    I think Dman is right on. I have an IO DLL that I must have added to the GAC.

    The recent projects section of Add References always remembers it, so all I have to is to check yes it's a reference. Then the namespace becomes part of Intellisense. It works really well.



  • Juergen W Leis

    Dman,

    I can't deny that the name is appropriate, once again you come through. I can't help feeling that I should be paying you a commission.

    So, I get having to reference the base classes and even having to use imports statement. If I install to the GAC, however, does that mean that it will come up in that handly list of references without having to do a browse That would be OK.

    I did some reading on GAC, the documenation recommends using windows installer to install a .dll to the GAC, but I am not entirely sure how to do that. Do I simply go to windows installer and choose install program as I would any other

    Thanks,

    SteveJ



  • Micah_

  • FormerMarine

    You could create a new project, add the references you use most often, etc., and then save it in the templates folder, then load it whenever you make a new project


  • How to add to the base class library?