An IDE solution question

  • Thread starter Thread starter Ray Mitchell
  • Start date Start date
R

Ray Mitchell

Hello,

I have two C# applications that use some files common to
both and some files unique to each. On the computer
itself I have them stored them in folders PROJA, PROJB,
and COMMON. I would like to set up a similar structuring
in the IDE so I created a solution containing two
projects. In the Solution Explorer I have no trouble
creating folder PROJA in project PROJA and folder PROJB in
project PROJB to hold the project-specific .CS files, but
how do I specify a COMMON folder to hold the common
files? All I've been able to do so far is create a
COMMONA and COMMONB in their respective projects and
duplicate the common .CS files, and this is certainly
unacceptable.

Thanks,
Ray Mitchell
 
Ray Mitchell said:
Hello,

I have two C# applications that use some files common to
both and some files unique to each. On the computer
itself I have them stored them in folders PROJA, PROJB,
and COMMON. I would like to set up a similar structuring
in the IDE so I created a solution containing two
projects. In the Solution Explorer I have no trouble
creating folder PROJA in project PROJA and folder PROJB in
project PROJB to hold the project-specific .CS files, but
how do I specify a COMMON folder to hold the common
files? All I've been able to do so far is create a
COMMONA and COMMONB in their respective projects and
duplicate the common .CS files, and this is certainly
unacceptable.

Hi Ray,

You have a couple options. One is if you right click on ProjA (or ProjB)
and select Add Existing Item there will be an Open File-like dialog appear.
On it's open button is a drop-down with an entry called Link file.

Another option is to create a DLL project for Common and add a reference to
Common in ProjA and ProjB. This is my preferred option because if you add
new artifacts to Common, other projects with references to Common get the
updates automatically and you don't have to mess around with going back to
link the files.

Joe
 
Back
Top