-
July 20th, 2012, 06:06 PM
#1
is common code possible in vb.net ?
Tried a forum search ... no joy.
I have multiple applications and a handful of funcs and subs that I use in many of them and I want to put those in ONE module and have that module used by all of the apps at compile time. Problem is, when I do that, it just copies the "common" module to the app folder and any changes I make happen THERE, and do not propagate back to the actual common module. That is, I can START with a common module but it doesn't stay common, so it actually ISN'T common in any formal sense of the word.
Is there anything I can do ?
Thanks
phinds
vs2008, 3.5SP1 Version 9.0.21022.8 RTM
-
July 20th, 2012, 07:57 PM
#2
Re: is common code possible in vb.net ?
Certainly:
Project -> Add Existing Item -> Add as Link (you have to click the button drop-down - a bad interface for sure).
-
July 20th, 2012, 09:38 PM
#3
Re: is common code possible in vb.net ?
I have a utility project that I include in all of my projects that does just what you're describing. It exists as a separate project and compiles down to its own DLL. Whenever I create a new project I just include the utility project as part of the solution. No special tricks. I'm using C# for all my work now but I know you can do exactly the same thing in VB.Net.
-Max
-
July 20th, 2012, 11:34 PM
#4
Re: is common code possible in vb.net ?
Originally Posted by David Anton
Certainly:
Project -> Add Existing Item -> Add as Link (you have to click the button drop-down - a bad interface for sure).
Excellent --- just what I was looking for. I really appreciate it.
phinds
vs2008, 3.5SP1 Version 9.0.21022.8 RTM
-
July 20th, 2012, 11:36 PM
#5
Re: is common code possible in vb.net ?
Originally Posted by Max Peck
I have a utility project that I include in all of my projects that does just what you're describing. It exists as a separate project and compiles down to its own DLL. Whenever I create a new project I just include the utility project as part of the solution. No special tricks. I'm using C# for all my work now but I know you can do exactly the same thing in VB.Net.
-Max
Yeah, thanks for the suggestion, and that would have been my fall-back position but I like the "add as link" a lot better.
phinds
vs2008, 3.5SP1 Version 9.0.21022.8 RTM
-
July 21st, 2012, 11:36 AM
#6
Re: is common code possible in vb.net ?
Originally Posted by phinds
Yeah, thanks for the suggestion, and that would have been my fall-back position but I like the "add as link" a lot better.
No problem. That does sound like it would work better in your situation (a module with functions in it). In my case I've got a number of different class modules in the utility project. Including the project let's me continue to develop them as I develop the project - the changes are immediately available in all other projects.
L8R! :-)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|