0

In my build pipeline I pull this container:

mcr.microsoft.com/dotnet/sdk:8.0.405

When I run dotnet format --version within that container I get the following version number:

8.3.546805+86f5186deeea364bd8541d51657e52a54b2a96b2

Why would I get .NET format version 8.3 when I am specifically asking for container version 8.0.405 ?

Locally I have the .Net SDK installed at version 8.0.405 and when I run dotnet format --version I correctly get:

Welcome to .NET 8.0!
---------------------
SDK Version: 8.0.405

I just do not understand what the discrepancy is.

This is causing me an issue as the format command behaves differently on my build server to running it locally but the versions should be exactly the same.

1 Answer 1

2

dotnet --version prints the SDK version which is 8.0.405.

dotnet format --version prints out the version number of the dotnet-format command which doesn't necessarily match the SDK version. In your case, the container version is newer than the one you've installed locally.

Each part of the SDK has it's own version number which is very clear if you do dotnet build --version which will print out 17.11.9.46202 in the 8.0.405 container.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.