How do we turn a 'user control' into a dll?

  • Thread starter Thread starter Glyn Meek
  • Start date Start date
G

Glyn Meek

We have developed a number of user controls in VB in 'Windows Control
Libraries' that we wish to use in other projects. How do we convert these
into a 'portable' dll?

Sorry if this is out there somewere, already, but we've tried searching all
over the place, and can't find anything relevant!

Glyn
 
If you've made a Windows Control Library project, then the controls you've
made are already compiled into a .dll.
 
And to expand on what Scott said, you need to now reference that DLL
(assembly) in other projects, just like you reference the .NET BCL (base
class library) assemblies. In VS.NET, right click on "References" and
click "Add Reference".

If your assembly is strong named (always a good idea for some level of
security - or rather integrity - and for easier versioning with
publisher policies), you can install the assembly into the Global
Assembly Cache (GAC) that will be used at runtime (just like the .NET
BCL assemblies). You could also keep it in your private path (the
application path, or another configured probing path), but servicability
isn't as easy.

You should read about versioning and assembly resolution on MSDN at
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconDeployingNETFrameworkApplications.asp
(Deploying Applications) and
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconConfiguringNETFrameworkApplications.asp
(Configuring Applications). This is essential information for effective
deployment of .NET assemblies.
 
Thanks everyone (especially Heath) ...it works perfectly. I actually didn't
know there wa s switch setting in the Project Properties that one has to set
before it will actually produce the dll!!
 
I actually didn't know there was switch setting in the Project Properties
that one has to set before it will actually produce the dll!!

No there isn't. All you need to do to produce the .dll is build the project
(which can be done from the build menu or by right-clicking the project in
the Solution Explorer and choosing "Build".

There are certainly important project settings in the project properties,
but you can build the .dll without setting them.
 
Back
Top