Organising classes in C# in Visual Studio ?

  • Thread starter Thread starter ORC
  • Start date Start date
O

ORC

Hi,

I have made a standalone class file Solution which I will use in several
other Solutions, but how do I insert the MyClass.cs file without having
Visual Studio copying the Solution to the folder that adds the MyClass? I
don't want to compile it to a dll - I better like to have a link or
something to the source code file itself!

Thank you very much for your help!

Ole
 
ORC said:
I have made a standalone class file Solution which I will use in several
other Solutions, but how do I insert the MyClass.cs file without having
Visual Studio copying the Solution to the folder that adds the MyClass? I
don't want to compile it to a dll - I better like to have a link or
something to the source code file itself!

Why, out of interest? This sounds like an ideal candidate to build as a
DLL and link against in other projects.
 
Because I want my exe file to be the only one to copy to the computers that
will run it, but if it is possible to implement the dll in the exe it would
be OK, but is it possible to do that?

Thanks
Ole
 
OK - figured it out!

Thanks
Ole

ORC said:
Because I want my exe file to be the only one to copy to the computers that
will run it, but if it is possible to implement the dll in the exe it would
be OK, but is it possible to do that?

Thanks
Ole

MyClass?
 
Hi,

Select Add Existing Item , browse to it, and in the button next to the file
name select "Link" instead of the default "open"

Cheers,
 
Back
Top