分享的.cs之间的VS 2010 C#项目文件文件、项目、cs、VS

2023-09-03 06:59:14 作者:爱自己ヽ没情敌

我在想,如果两个单独的C#Windows项目(在两个单独的解决方案)可以共享同一个的.cs共享定义文件?如果是这样,那么如何?

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。其中一个项目是ASP.NET Web应用程序的第二个项目是C#Windows服务(开始作为一个Windows控制台项目。)

PS. One project is ASP.NET web app and the second project is C# Windows service (started as a Windows console project.)

推荐答案

添加现有用品 - >添加链接(通过选择下拉添加按钮找到)

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