且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在OS X和vs代码上使用多个.net项目

更新时间:2021-10-10 22:25:02

如果您不使用Visual Studio(完整版),则不需要解决方案或xproj文件.您只需要使用文件夹和project.json文件来标记您的项目,然后每个项目都可以在项目文件的dependencies部分中添加对另一个项目的引用,如本例所示:

If you don't use Visual Studio (the full version), then you don't need a solution or xproj files. You just use folders and project.json files to mark your projects then each project can add a reference to another one in the dependencies section of the project file, like in this example:

https: //github.com/aspnet/Configuration/blob/1b302daf1c9bf7e723a26f5507f033c3e313e106/src/Microsoft.Extensions.Configuration.Ini/project.json#L20-L23

编辑(评论摘要):

  • 要引用其他文件夹中的项目,请将其添加到global.json文件
  • 要在VS代码中获得智能,您必须选择一个项目(窗口右下角有一个下拉菜单)