how to share the source .cs file between muti project?

T

thxBruin

I have a Class CTest in test.cs but two or more projects need this class. So
how to share the SOURCE FILE(test.cs, not using dll file) in these projects?
 
M

Marc Scheuner [MVP ADSI]

I have a Class CTest in test.cs but two or more projects need this class. So
how to share the SOURCE FILE(test.cs, not using dll file) in these projects?

In Project 2, go to the solution explorer, go to the project in
question, right-click and go "Add existing item".

Then in the browser window, go to the file in question, highlight it,
and then don't just click on the "Open" button, but check out the
"drop-down" list of the Open button - choose "Link file".

That way, you just create a link to that existing file - you won't
have two copies of the file in two directories, but just a link back
to the original location of that file

Marc

================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 
T

thxBruin

thanks

Marc Scheuner said:
projects?

In Project 2, go to the solution explorer, go to the project in
question, right-click and go "Add existing item".

Then in the browser window, go to the file in question, highlight it,
and then don't just click on the "Open" button, but check out the
"drop-down" list of the Open button - choose "Link file".

That way, you just create a link to that existing file - you won't
have two copies of the file in two directories, but just a link back
to the original location of that file

Marc

================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 
D

Dmitriy Lapshin [C# / .NET MVP]

Hi,

You can either:

a) Employ your source control system's "Share" feature (Microsoft VSS
definitely has one)
b) Add the file as a linked item to one of these projects (I believe only VS
..NET 2003 supports this)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top