0

I downloaded the VS2022 for mac version,It seems to install the .net6 version of the environment for me by default, and I installed a 3.1 version myself. The local environment is as follows: enter image description here

How do I switch the default .net6 version to the 3.1 version?

2

1 Answer 1

1

You can change the target framework version from project .csproj file and change the <TargetFramework>net6.0</TargetFramework> value to your .net version. Alternatively you can introduce a global.json to use a exact specified version for the solution/project, just place it in the project directory.

{
  "sdk": {
    "version": "3.1.100",
    "rollForward": "disable"
  }
}
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.