LP13
LP13

Reputation: 34189

Find which target framework application is building on?

I have old .NET Core project. Under application properties the project's Target framework is .NET Core 2.0 enter image description here

But on the build server We don't have 2.0 SDK installed. Instead we have other SDK versions, like 2.1, 2.2 etc

enter image description here

The application is building and working fine. Build server is using dotnet publish -c Release command to build the application. But how do I know which version is being used to build the application. Is it using the latest version of 2.*, which in this case 2.2.402?

Upvotes: 0

Views: 634

Answers (1)

Ruikai Feng
Ruikai Feng

Reputation: 11974

I think you could check this document

As mentioned in the document:

The process for selecting an SDK version is:

dotnet searches for a global.json file iteratively reverse-navigating the path upward from the current working directory.

dotnet uses the SDK specified in the first global.json found.

dotnet uses the latest installed SDK if no global.json is found.

Upvotes: 0

Related Questions