我找不到使用https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-sln中描述的dotnet核心CLI命令创建新解决方案文件的方法。
我运行了命令:
dotnet new web -n webtrain
dotnet new classlib -n core
之后,项目被正确创建,但现在我想创建一个解决方案文件来将它们全部分组,但我找不到正确的命令来执行此操作。谁知道怎么做?
答案 0 :(得分:18)
看起来像你使用dotnet new sln --name mysolution.sln
https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-new
答案 1 :(得分:0)
我已经看到这是一个两步操作,包括: 1-在所需文件夹中使用“ dotnet new sln --name mysolution.sln”命令创建解决方案文件,然后 2-使用命令“ dotnet sln yourSlnFileYouCreated.sln add PathToTheCsProjFile”将csproj文件添加到此解决方案中
如果需要,您可以删除更多项目并将其添加到同一解决方案文件中。
https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-new https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-sln。