Dotnet-Boxed/Framework

Would it be possible to leverage CAKE for the DotnetNew

VictorioBerra opened this issue · 1 comments

Instead of using our own ProjectExtensions why not use CAKE's library? https://github.com/cake-build/cake/tree/develop/src/Cake.Common/Tools/DotNetCore

This has all the DotnetBuild, DotnetRun, DotnetPublish.

I have not done any serious looking into this, but it seems like we could NuGet CAKE and utilize it here and cutdown on the code we maintain. Also, CAKEs stuff is tested and everything tool.

This is how it works:

  1. Run dotnet new --install to install the templates.
  2. Run dotnet new to create a project in a temporary folder.
  3. Run dotnet restore, dotnet build.
  4. For some tests, I run dotnet run with custom port numbers etc. so that there are no port collisions. I then create HttpClient instances preconfigured with these ports and pass them to the unit test code which runs assetions. Finally we kill the process.

Cake just provides a few very light wrappers around Process.Start similar to what I do but I do but I let you run code before and after in a test. Also I let you run tests during the test project actually being run. Not much code there to maintain aswell