Share .cs file among VS 2010 C# projects

后端 未结 2 866
耶瑟儿~
耶瑟儿~ 2021-01-24 11:25

I was wondering if two separate C# Windows projects (in two separate solutions) can share one .cs file with shared definitions? If so, then how?

PS. One project is ASP.N

相关标签:
2条回答
  • 2021-01-24 11:47

    Move that cs file/code to be shared to a new class library project and refer that in your other 2 projects.

    0 讨论(0)
  • 2021-01-24 12:09

    Add Existing Item->Add As Link (found by selecting drop down on Add button)

    0 讨论(0)
提交回复
热议问题