Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > .NET Framework 2.0
| Search | Today's Posts | Mark Forums Read
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 17th, 2004, 12:37 AM
Authorized User
 
Join Date: Mar 2004
Location: Mt Tamborine, Gold Coast, Queensland, Australia.
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using common .vb code in multi projects

Hi,

I have some .vb code that is common to a number of projects. How can I get away with only having one copy of this code rather than copying it between project folders?

Thanks


Kerry O'Carroll
Interphase Systems P/L
kerry@interphase.net.au
__________________
Kerry O\'Carroll
 
Old August 17th, 2004, 08:16 AM
Friend of Wrox
Points: 3,489, Level: 24
Points: 3,489, Level: 24 Points: 3,489, Level: 24 Points: 3,489, Level: 24
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Central, NJ, USA.
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Is this specific to .NET 2.0 or did you post in the wrong place?

In 1.X, at least, you can "Strong Name" your assembly's and put it in the Global Assembly Cache. Then any proccess on that same machine can access it.

Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old August 17th, 2004, 04:10 PM
Authorized User
 
Join Date: Mar 2004
Location: Mt Tamborine, Gold Coast, Queensland, Australia.
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hal,

Thanks for your reply.

This is .NET 1.0

I may have placed this in the wrong section, please advise as I will have more questions later (probably).

I will look into 'strong naming' the assembly. I don't know how do do this, but will look through books etc. Any hints on getting started with this. My common .vb code are common sub-routines and structures.

Thanks

Kerry O'Carroll
Interphase Systems P/L
kerry@interphase.net.au
 
Old August 17th, 2004, 04:28 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

Either add this common code to a project and make a common dll, and add this to multiple projects, or like previously suggested, add it to the GAC.

Brian
 
Old August 17th, 2004, 04:35 PM
Friend of Wrox
Points: 3,489, Level: 24
Points: 3,489, Level: 24 Points: 3,489, Level: 24 Points: 3,489, Level: 24
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Central, NJ, USA.
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Kerry,

Yes, this is in the wrong forum. As you can see this is the .NET 2.0 forum. Hopefully a moderator with access can move this over to the General .NET forum.


As for Strong naming- you need to create a SNK file and then use a utility to give the assembly the strong name.

Here are some references from a quick google search:
http://www.ondotnet.com/pub/a/dotnet...ongnaming.html
http://msdn.microsoft.com/library/de...iderations.asp
http://jclement.ca/blog/2003-12-17T14_16_44.html

Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old August 17th, 2004, 04:38 PM
Authorized User
 
Join Date: Mar 2004
Location: Mt Tamborine, Gold Coast, Queensland, Australia.
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hal and Brian,

Thanks for your advice.

In future I will use the "General .NET Forum"

Regards

Kerry O'Carroll
Interphase Systems P/L
kerry@interphase.net.au




Similar Threads
Thread Thread Starter Forum Replies Last Post
common code austinf XSLT 3 May 3rd, 2006 09:38 AM
VB Net deploying projects anwarmanaf VB.NET 2 May 31st, 2005 11:30 AM
Access db/ Common Dialog/ errors in code azkabancells VB Databases Basics 1 May 25th, 2005 10:34 AM
Creating a Class for multi projects ocarroll General .NET 6 December 4th, 2004 05:13 PM
Common question, not so common answer? flyin ADO.NET 5 March 24th, 2004 06:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.