dotnet build --no-restore execute restore implicitly

659 views Asked by At

I'm using dotnet build --no-restore command to don't execute the restore of nuget packages in my project. But what I see in the output is this anyway:

PS C:\...> dotnet build --no-restore

MSBuild version 17.6.0-preview-23122-01+4b5e303b3 for .NET
C:\Program Files\dotnet\sdk\7.0.300-preview.23122.5\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(287,5): message NETSDK1057: You are using a preview version of .NET. See: https:
//aka.ms/dotnet-support-policy [C:\....Tests.csproj]
C:\....Tests.csproj : warning NU1803: You are running the 'restore' operation with an 'HTTP' source, 'http://.../NuGetServer/nuget'. Non-HTTPS access will be removed in a future version. Consider migrating to an 'HTTPS' source.
C:\Program Files\dotnet\sdk\7.0.300-preview.23122.5\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(287,5): message NETSDK1057: You are using a preview version of .NET. See: https:
//aka.ms/dotnet-support-policy [C:\....csproj]
C:\....csproj : warning NU1803: You are running the 'restore' operation with an 'HTTP' source, 'http://.../NuGetServer/nuget'. Non-HTTPS acc
ess will be removed in a future version. Consider migrating to an 'HTTPS' source.
  BBLearnWrapper -> C:\....dll
  BBLearnWrapper.Tests -> C:\....Tests.dll

Compilation compleated.

This is a problem for me, because later I want to use this command with /warnaserror option in my CI env to ensure that the project doesn't have any Stylecop issue. In this case, the command will result an error code without running the build and without run the linter.

0

There are 0 answers