Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building/Running/Tasks multiple dotnet project in Visual Studio code?

I have a project structure like the following and I would like to be able to run tasks on all projects at once so that i maybe able to build and run as well as run tests on all projects in one command using Visual Studio code? is this possible?

-global.json
-src
    -Web
        -project.json
        -program.cs
    -Web2
        -project.json
        -program.cs
-test
    -Web.Test
        -project.json
        -program.cs
    -Web2.Test
        -project.json
        -program.cs
like image 964
Madu Alikor Avatar asked Aug 12 '26 22:08

Madu Alikor


1 Answers

You can add a solution file to your root folder with dotnet new sln. You can then add project references with dotnet sln add : https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-sln

dotnet build will then build all referenced projects, and dotnet test will run all unit tests found.

like image 83
Aidan Black Avatar answered Aug 15 '26 20:08

Aidan Black



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!