The-Standard-Organization / ADotNet

ADotNet is a.NET library that enables software engineers on the .NET platform to develop AzureDevOps pipelines and Git Actions in C#.
98 stars 34 forks source link

Optionally specify "--no-restore" in DotNetBuildTask #40

Open icnocop opened 1 year ago

icnocop commented 1 year ago

Hi.

Thank you for ADotNet.

DotNetBuildTask always specifies --no-restore.

This requires the pipeline to explicitly call RestoreTask if the project/solution being built references any nuget packages.

I expected DotNetBuildTask to make restoring nuget packages optional.

Thank you.

cjdutoit commented 4 months ago

@icnocop the default is dotnet build --no-restore when you do:

  new DotNetBuildTask
  {
      Name = "Build",
  },

You can however override this behaviour by doing:

new DotNetBuildTask
{
    Name = "Build",
    Run = "dotnet build"
},

Hope this helps