I have a solution that contains about 10 projects, but I need to build a few of them into the same output directory with the same runtime. I managed to build a single project, but when I try to list another one .csproj to cmd it says that I can't specify several of them in one cmd. I can't build an .sln because I don't need all of the projects
dotnet build MyProj\MyProj.csproj MyProj2\MyProj2.csproj --configuration Debug -r win-x64 -p:Platform=x64
=
error MSB1008: Only one project can be specified.
You can't do this (at least directly), as dotnet build
specify the first command argument is a singular project or solution:
PROJECT | SOLUTION
The project or solution file to build. If a project or solution file isn't specified, MSBuild searches the current working directory for a file that has a file extension that ends in either proj or sln and uses that file.
You can workaround by: