using common classes and enums for all projects in a Solution

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nariban Barkan

    using common classes and enums for all projects in a Solution

    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.


  • Jon Skeet [C# MVP]

    #2
    Re: using common classes and enums for all projects in a Solution

    On Jun 11, 10:45 am, "Nariban Barkan" <SomeFunny...@s .comwrote:
    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

    Comment

    • Marc Gravell

      #3
      Re: using common classes and enums for all projects in a Solution

      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.publi c.dotnet.framew ork ("Annoying Web Service Compilation
      Issue").

      Marc

      Comment

      • Nariban Barkan

        #4
        Re: using common classes and enums for all projects in a Solution

        Thanks ....


        Comment

        • Brian Gideon

          #5
          Re: using common classes and enums for all projects in a Solution

          On Jun 11, 4:45 am, "Nariban Barkan" <SomeFunny...@s .comwrote:
          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.

          Comment

          Working...