Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > .NET Framework 2.0
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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
Reply With Quote
  #2 (permalink)  
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,102
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
Reply With Quote
  #3 (permalink)  
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
Reply With Quote
  #4 (permalink)  
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
Reply With Quote
  #5 (permalink)  
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,102
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
Reply With Quote
  #6 (permalink)  
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 11:04 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.