How to share source code files between projects?

M

Magnus Bergh

How should I share source code between different projects? In this case
it is one solution with multiple projects where some source files I want
to share (including the dataset classes).

I thought this would be easy, put the files in one directory and make a
link to each file, however this cause trouble in the designer,
especially with the dataset classes, if I link the dataset classes (XSD
and the designer generated files) as linked files forms that use the
dataset refuse to open in the designer.

Of course one solution would be to put the shared files in their own
assembly and compile them to DLLs and include them as references but
this is really not necessary. I only want the source files to reside in
one location.

There must be a simple solution for this that I am missing. haven't been
able to find anythign in the documentation hwo to do this.
 
K

Kevin Spencer

It *is* easy. Put the "shared files" in their own class library project, and
include that project in the solution that contains the other 2 projects.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 

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