Response.Write("Version: " + System.Environment.Version.ToString());
About the asp.net core version,what do you want of .NET Core SDK version,.NET Core information,the installed runtimes or the installed SDKs. You could write following commands.
dotnet --version // Display .NET Core SDK version. dotnet --info //Display .NET Core information. dotnet --list-runtimes // Display the installed runtimes. dotnet --list-sdks // Display the installed SDKs.
You can view all .NET Core versions Installed on the system by navigating to the installation folder on below path.
Also you could check in Solution Explorer. Open the right-click menu for the project that you want to check, and choose Properties, then select Application tab > Target framework.
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Refer the below article.
5 people are following this question.