作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我的文件夹结构如下:project/csproj A、project/csproj B
如果我在 vs 代码项目目录中打开,omnisharp 仅适用于 csproj B。如果我在 vs code project/csproj A 目录中打开,omnisharp 适用于该项目。
如何解决这个问题,以便我可以打开项目目录并为两个项目使用 omnisharp?
如果重要的话, splinter 的项目是 nunit 类型。我尝试重新加载 vscode,禁用/启用 omnisharp。
我在空目录中创建了项目
dotnet new nunit -n=projectB
最佳答案
解决方案由 sln 文件指定,如果您还没有,只需在解决方案级文件夹中创建一个新的
dotnet new sln
dotnet sln path/to/solution add path/to/project
<Solution and git repository level folder>
|-- src
| |-- <Project level folders>
| | |-- <Folder structures based on namespace>
| | | └-- <Source files>
| | |-- <Asset files with approprate folder structure>
| | └-- <The csproj file>
| |-- Directory.Build.props (Common MSBuild props for all src projects)
| └-- Directory.Build.targets (Common MSBuild targets for all src projects)
|-- test
|-- └-- <Test projects with similar folder structure to src>
|-- build
|-- └-- <Common MSBuild props and targets files to be referenced by src and test>
|-- docs
| └-- <Documents>
|-- <Other repository assets>
└-- <The sln file>
关于visual-studio-code - vscode omnisharp 不适用于解决方案,但适用于项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56186264/
我是一名优秀的程序员,十分优秀!