简体   繁体   中英

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? If so, then how?

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

添加现有项->添加为链接(通过选择添加按钮上的下拉菜单找到)

将要共享的cs文件/代码移动到新的类库项目中,并在其他2个项目中引用它。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM