如何在OS X和vs代码上使用多个.net项目 [英] How to work with multiple .net projects on os x and vs code
问题描述
我正在尝试使用vs代码创建典型的解决方案/项目布局.我使用yo aspnet
创建了各种库,但是我不知道如何在vs代码中引用项目.我是否在根目录使用单个project.json?它如何知道启动项目和入口点是什么?另外,是否有办法在命名空间上获得智能?
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?
推荐答案
如果您不使用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:
编辑(评论摘要):
- 要引用其他文件夹中的项目,请将其添加到
global.json
文件 - 要在VS代码中获得智能,您必须选择一个项目(窗口右下角有一个下拉菜单)
这篇关于如何在OS X和vs代码上使用多个.net项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!