how to share the source .cs file between muti project?

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

    how to share the source .cs file between muti project?

    I have a Class CTest in test.cs but two or more projects need this class. So
    how to share the SOURCE FILE(test.cs, not using dll file) in these projects?


  • Marc Scheuner [MVP ADSI]

    #2
    Re: how to share the source .cs file between muti project?

    >I have a Class CTest in test.cs but two or more projects need this class. So[color=blue]
    >how to share the SOURCE FILE(test.cs, not using dll file) in these projects?[/color]

    In Project 2, go to the solution explorer, go to the project in
    question, right-click and go "Add existing item".

    Then in the browser window, go to the file in question, highlight it,
    and then don't just click on the "Open" button, but check out the
    "drop-down" list of the Open button - choose "Link file".

    That way, you just create a link to that existing file - you won't
    have two copies of the file in two directories, but just a link back
    to the original location of that file

    Marc

    =============== =============== =============== =============== ====
    Marc Scheuner May The Source Be With You!
    Bern, Switzerland m.scheuner(at)i nova.ch

    Comment

    • thxBruin

      #3
      Re: how to share the source .cs file between muti project?

      thanks

      "Marc Scheuner [MVP ADSI]" <m.scheuner@ino va.SPAMBEGONE.c h> дÈëÓʼþ
      news:hrkjrv8qqh t6m6r44vmhilodr mjm1ftsap@4ax.c om...[color=blue][color=green]
      > >I have a Class CTest in test.cs but two or more projects need this class.[/color][/color]
      So[color=blue][color=green]
      > >how to share the SOURCE FILE(test.cs, not using dll file) in these[/color][/color]
      projects?[color=blue]
      >
      > In Project 2, go to the solution explorer, go to the project in
      > question, right-click and go "Add existing item".
      >
      > Then in the browser window, go to the file in question, highlight it,
      > and then don't just click on the "Open" button, but check out the
      > "drop-down" list of the Open button - choose "Link file".
      >
      > That way, you just create a link to that existing file - you won't
      > have two copies of the file in two directories, but just a link back
      > to the original location of that file
      >
      > Marc
      >
      > =============== =============== =============== =============== ====
      > Marc Scheuner May The Source Be With You!
      > Bern, Switzerland m.scheuner(at)i nova.ch[/color]


      Comment

      • Dmitriy Lapshin [C# / .NET MVP]

        #4
        Re: how to share the source .cs file between muti project?

        Hi,

        You can either:

        a) Employ your source control system's "Share" feature (Microsoft VSS
        definitely has one)
        b) Add the file as a linked item to one of these projects (I believe only VS
        ..NET 2003 supports this)

        --
        Dmitriy Lapshin [C# / .NET MVP]
        X-Unity Test Studio

        Bring the power of unit testing to VS .NET IDE

        "thxBruin" <jstony@163.com > wrote in message
        news:%23QIJLoZr DHA.1656@tk2msf tngp13.phx.gbl. ..[color=blue]
        > I have a Class CTest in test.cs but two or more projects need this class.[/color]
        So[color=blue]
        > how to share the SOURCE FILE(test.cs, not using dll file) in these[/color]
        projects?[color=blue]
        >
        >[/color]

        Comment

        Working...