473,320 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Sharing Source Code Across Different Solutions

I have common classes that I would like to share amongst a few stand
alone projects. They are independent of each other and not related in
any way. For the life of me, I cannot figure out how to share a
single source code file amongst multiple projects. When I attempt to
add an existing item to a project, Visual Studio makes a copy of the
file. I do not want ten copies of the same source code that I later
have to maintain.

I tried editing the file name and adding ..\Common\whatever.vb, but
this is not permitted. It seems like such a simple thing that I
should not be struggling with.

Any help would be appreciated.

Thanks.
Jul 15 '07 #1
5 1249
ja***@onepost.net wrote in news:at********************************@4ax.com:
I have common classes that I would like to share amongst a few stand
alone projects. They are independent of each other and not related in
any way. For the life of me, I cannot figure out how to share a
single source code file amongst multiple projects.
Create a library (DLL).
Jul 15 '07 #2
<ja***@onepost.netschrieb:
[...] I cannot figure out how to share a
single source code file amongst multiple projects. When I attempt to
add an existing item to a project, Visual Studio makes a copy of the
file. I do not want ten copies of the same source code that I later
have to maintain.
Click "Add Existing Item...", select the file, and then change the
dropdown button to reference the file only and keep it in its original
location.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Jul 15 '07 #3
On Sun, 15 Jul 2007 19:39:31 +0200, "Herfried K. Wagner [MVP]"
<hi***************@gmx.atwrote:
>Click "Add Existing Item...", select the file, and then change the
dropdown button to reference the file only and keep it in its original
location.
Interesting -- I do not have these options after clicking Add Existing
Item.

Ah -- I just found it. There's a drop down arrow to the right of the
Add button. I have to select "Add As Link."

Thanks!
Jul 15 '07 #4
On Sun, 15 Jul 2007 17:37:27 GMT, Spam Catcher
<sp**********@rogers.comwrote:

>Create a library (DLL).
Yeah -- this would have been my last resort. I have the source shared
now though.
Jul 15 '07 #5
ja***@onepost.net wrote in news:vm********************************@4ax.com:
On Sun, 15 Jul 2007 17:37:27 GMT, Spam Catcher
<sp**********@rogers.comwrote:

>>Create a library (DLL).

Yeah -- this would have been my last resort. I have the source shared
now though.
It's probably the best way too :-)
Jul 15 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Simon Neve | last post by:
Hello, This question is related to sharing .Net projects across solutions and is reposted from the SourceSafe group. We have several different solutions and want to share common assemblies...
7
by: Dan | last post by:
I'd like to have a set of more-or-less common code which I want to use for both desktop and smart device projects. I have two questions: 1. How can I set up conditional compile directives for...
5
by: geoffblanduk_nospam | last post by:
Is it valid to share namespaces across projects in C#? For example, I have a project that contains the code for a core assembly, this builds a DLL. I then have a second project in the same...
0
by: John Lafrowda | last post by:
Dear all, here is a simple problem that I cannot overcome: I'm trying to write a client/server application in Visual Basic .net. The server is an executable (.exe) project, the clients are class...
2
by: Carlo \(MCP only\) | last post by:
Hi to all I'm askyng you a suggestion about the best way to share the same source code between VS2003 and VS2005. The project I'm developing is a controls and components library, and the...
2
by: Chris Fink | last post by:
What is the recommendation for sharing master pages across IIS Servers? In our corporation, we have many webservers in different environments (intranet, extranet, etc). I've done some searching,...
1
by: Matt Owens | last post by:
Hi, Im setting up a new project in which I'd like to share code across numerous other projects, specifically a control library and an array of common objects. Im not really sure how best to go...
2
by: Jeff Dege | last post by:
I'm working with a group that's been doing C++ coding for quite a long time, now, and in that environment we've pretty much worked out development practices that serve us well. We've been doing...
45
by: =?Utf-8?B?QmV0aA==?= | last post by:
Hello. I'm trying to find another way to share an instance of an object with other classes. I started by passing the instance to the other class's constructor, like this: Friend Class...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.