Using Shared Classes

  • Thread starter Thread starter Sylvie
  • Start date Start date
S

Sylvie

Hello,

I have a web application and windows application,

My web application has App_Code folder and in this folder have a Users.cs
file, this file has some user management classes and routines,

The problem is, when I try to use this class from windows application and
want to add these classes to my app. Vs.2005 copies these classes to windows
application folder, it means, it duplicates these users.cs file

I want to use first Users.cs as a reference, How can It be ?

Thanks
 
I have a web application and windows application,

My web application has App_Code folder and in this folder have a Users.cs
file, this file has some user management classes and routines,

The problem is, when I try to use this class from windows application and
want to add these classes to my app. Vs.2005 copies these classes to windows
application folder, it means, it duplicates these users.cs file

I want to use first Users.cs as a reference, How can It be ?

Create a class library containing the common code, and reference it
from both projects.

Jon
 
If you are using a source control program, you may be able to share the
files between the two projects. I think in Visual Source Safe this is called
"Share file".
 
If you are using a source control program, you may be able to share the
files between the two projects. I think in Visual Source Safe this is called
"Share file".

That's a really bad solution to the problem though - using a class
library is a solution specifically designed for this very problem.

Jon
 
T.J. Thornbrook said:
Then you have the dll in two places.

You have the "original" DLL in one place, and then building the other
applications copies the DLL. There's no harm in that, IMO.
 
I ll try Class Library

Thanks


iletide sunu yazdi said:
You have the "original" DLL in one place, and then building the other
applications copies the DLL. There's no harm in that, IMO.
 
Back
Top