[英]Share .cs file among VS 2010 C# projects
I was wondering if two separate C# Windows projects (in two separate solutions) can share one .cs file with shared definitions? 我想知道两个单独的C#Windows项目(在两个单独的解决方案中)是否可以共享一个共享定义的.cs文件? If so, then how?
如果是这样,那又如何?
PS. PS。 One project is ASP.NET web app and the second project is C# Windows service (started as a Windows console project.)
一个项目是ASP.NET Web应用程序,第二个项目是C#Windows服务(从Windows控制台项目开始)。
添加现有项->添加为链接(通过选择添加按钮上的下拉菜单找到)
将要共享的cs文件/代码移动到新的类库项目中,并在其他2个项目中引用它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.