How to work with multiple .net projects on os x and vs code

≡放荡痞女 提交于 2020-01-03 01:28:06

问题


I am trying to create a typical solution/project layout using vs code. I created the various libraries using yo aspnet, but I don't know how to reference projects in vs code. Do I use a single project.json at the root? How does it know what the startup project and entry point are? Also, is there a way to get intellisense on the namespacing?


回答1:


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

Edit (summary of the comments):

  • To reference projects in other folders, add them to the global.json file
  • To get intellisense in VS code, you must select a project (there's a drop down in the lower right corner of the window)


来源:https://stackoverflow.com/questions/36274642/how-to-work-with-multiple-net-projects-on-os-x-and-vs-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!