using common classes and enums for all projects in a Solution

N

Nariban Barkan

Hi All,
I am using VS.2008 and I have one windows apllication project and two web
project in my solution.

How can i use common classes and enums for all projects ?

I add "Solution Items" folder in my Solution and create a class in that
folder but i can not reach that class from any of the projects ..

Thanks in advance.
 
J

Jon Skeet [C# MVP]

I am using VS.2008 and I have one windows apllication project and two web
project in my solution.

How can i use common classes and enums for all projects ?

I add "Solution Items" folder in my Solution and create a class in that
folder but i can not reach that class from any of the projects ..

Create a class library project, and then add a reference to that
project from each of the others.

Jon
 
M

Marc Gravell

Note that if you are using web-references (i.e. asmx etc) then things
get more interesting. I just answered something very similar over in:
microsoft.public.dotnet.framework ("Annoying Web Service Compilation
Issue").

Marc
 
B

Brian Gideon

Hi All,
I am using VS.2008 and I have one windows apllication project and two web
project in my solution.

How can i use common classes and enums for all projects ?

I add "Solution Items" folder in my Solution and create a class in that
folder but i can not reach that class from any of the projects ..

Thanks in advance.

For what's it worth I do find that method of sharing code useful in
one particular case. That is to share the assembly level attributes
for product and version information. From each project in the
solution you can "link" in a file from outside the project by clicking
the down arrow on the Add button in the Add Existing File dialog box
and chosing Add as Link.
 

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

Members online

No members online now.

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top