.net-core - .NET Core : How to create solution folders from the command line

标签 .net-core

我正在组织一个新项目,我想从命令行中创建尽可能多的项目。

我喜欢将测试项目放入解决方案文件夹中。但是,命令dotnet sln add似乎有所限制。它的参数列表似乎只包含要添加的项目文件列表。

添加新创建的项目时(在我的情况下测试项目,但问题更笼统),是否有一种方法可以指定解决方案文件夹(而不是物理文件夹)?

最佳答案

目前不可能,您需要创建物理结构文件夹,例如解决方案结构文件夹

dotnet new <typeproj> --output "physical/domain" --name "domain"

dotnet new <typeproj> --output "physical/service" --name "service"

在使用Visual Studio打开解决方案后,创建“ physical ”解决方案文件夹,并添加您已经准备好的以前的项目

关于.net-core - .NET Core : How to create solution folders from the command line,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49734208/

相关文章:

c# - .NET core 3.0 System.IO.Ports SerialPort 在 RPI 上始终使用 5-10% CPU

c# - 在 Core 2.1 中将 byte[] 转换为 Bitmap

c# - 使用 Entity Framework Core 进行全文搜索

c# - Guid.NewGuid(); .NET Core 的幕后

c# - .NET Core 中 HttpListener 的模拟是什么

c# - 如何轻松地为多个 Lambda 函数添​​加环境变量?

c# - 如何在 Blazor WebAssembly 中获取静态图像文件的文件路径列表?

c# - .NET Core 3.1 - Linux 容器 : Clean Shutdown 中的 Worker 服务

c# - VSCode 中的 DotNet 核心 3.0 编译问题

angular - Typescript 指令错误 : "Breakpoints set but not yet bound" in VS2017