Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shared assemblies question

Status
Not open for further replies.

Nro

Programmer
May 15, 2001
337
CA
I’m in the process of learning C#. My background is VFP (3.0 to 9.0) so I have some OOP experience.

There is a concept I try to understand. Shared assemblies are supposed to be a kind of repository for base classes. I’ve created a Class project (WindProj01) with some classes. Compiled into DLL and registered with GAC util. It appear into Global Assembly Cache Dir (\windows\assembly).It’s fine, versioning is ok. I can even see the classes with IL Disassembler.

My question : When I create a new project and try to add a reference, is my assembly (WindProj01) supposed to appear in the .NET tab ? I can browse the DLL, but is it the best way to use Shared assemblies?

OS : Vista and XP Pro. VS 2008

Thanks in advance.

Nro


 
I never register my assemblies in GAC. this becomes a maintenance nightmare with versioning and installation. here directory structure I use for referencing assemblies.
[tt]
root
solution.sln
src
Web.project
Con.project
Win.project
Core.project
Test.project
lib
Castle
[castle assemblies]
NHibernate
[nh assemblies]
log4net
[logging assemblies]
[/tt]
all my 3rd party (and my custom) assemblies are local to the project. this also works well with version control software.

3rd party assemblies are kept in lib. I add references as necessary to my projects.

the src folder is for all of the code I write. Core is the shared objects, repositories, factories, domain object, etc.
Core is then referenced to assemblies that need it. Web for asp.net, Win for desktop, Con for console apps.

this also makes deployment easy as I can use xcopy to copy and paste the application and related assemblies to production.

this way I'm not messing with the GAC at all. The only time I reference GAC is for core .net libraries.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Thanks for the answer Jason

You have exactlty the same structure I use for my VFP projects, so I'm on the right track.

One more thing. I the project I'll reference to my assembly (WindProj01.DLL). When I'll create the package to distribute, will it include it to the package automatically, or I need to include the source code for the assembly?

thanks again

Nro
 
once the assembly is compiled you don't need the source files, just the assembly.

I don't have any experience with deployment packages. all my apps are for internal use only without a complex deployment strategy. I just copy and paste.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top