To run existing .NET Core applications (either on a web server like IIS or directly on your computer), you need the .NET Core runtime. If you intend to build new .NET Core applications, you'll need the .NET Core SDK, which includes all the development tools. Therefore, it's recommended to install the SDK.
Why ins'nt C# 7.0.0 not recognized ?
I just installed the 7.0.0 runtime for the tutorial about razor pages cause it's the required version according to the terminal
"dotnet watch
dotnet watch 🔥 Hot reload enabled. For a list of supported edits, see https://aka.ms/dotnet/hot-reload.
💡 Press "Ctrl + R" to restart.
dotnet watch ⌚ C:\Program Files\dotnet\sdk\9.0.203\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(32,5): warning NETSDK1138: La version cible de .NET Framework ('net7.0') n'est pas prise en charge et ne recevra pas les mises à jour de sécurité. Consultez https://aka.ms/dotnet-core-support pour plus d'informations sur la stratégie de support. [C:\Users\pierr\Documents\Developpement\Microsoft_courses\mslearn-create-razor-pages-aspnet-core\ContosoPizza\ContosoPizza.csproj]
dotnet watch ⌚ C:\Program Files\dotnet\sdk\9.0.203\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(32,5): warning NETSDK1138: La version cible de .NET Framework ('net7.0') n'est pas prise en charge et ne recevra pas les mises à jour de sécurité. Consultez https://aka.ms/dotnet-core-support pour plus d'informations sur la stratégie de support. [C:\Users\pierr\Documents\Developpement\Microsoft_courses\mslearn-create-razor-pages-aspnet-core\ContosoPizza\ContosoPizza.csproj]
dotnet watch ⌚ Building C:\Users\pierr\Documents\Developpement\Microsoft_courses\mslearn-create-razor-pages-aspnet-core\ContosoPizza\ContosoPizza.csproj ...
dotnet watch 🔨 Build succeeded: C:\Users\pierr\Documents\Developpement\Microsoft_courses\mslearn-create-razor-pages-aspnet-core\ContosoPizza\ContosoPizza.csproj
dotnet watch ⌚ C:\Program Files\dotnet\sdk\9.0.203\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(32,5): warning NETSDK1138: La version cible de .NET Framework ('net7.0') n'est pas prise en charge et ne recevra pas les mises à jour de sécurité. Consultez https://aka.ms/dotnet-core-support pour plus d'informations sur la stratégie de support. [C:\Users\pierr\Documents\Developpement\Microsoft_courses\mslearn-create-razor-pages-aspnet-core\ContosoPizza\ContosoPizza.csproj]
dotnet watch ⌚ C:\Program Files\dotnet\sdk\9.0.203\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(32,5): warning NETSDK1138: La version cible de .NET Framework ('net7.0') n'est pas prise en charge et ne recevra pas les mises à jour de sécurité. Consultez https://aka.ms/dotnet-core-support pour plus d'informations sur la stratégie de support. [C:\Users\pierr\Documents\Developpement\Microsoft_courses\mslearn-create-razor-pages-aspnet-core\ContosoPizza\ContosoPizza.csproj]
dotnet watch ⌚ C:\Program Files\dotnet\sdk\9.0.203\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(32,5): warning NETSDK1138: La version cible de .NET Framework ('net7.0') n'est pas prise en charge et ne recevra pas les mises à jour de sécurité. Consultez https://aka.ms/dotnet-core-support pour plus d'informations sur la stratégie de support. [C:\Users\pierr\Documents\Developpement\Microsoft_courses\mslearn-create-razor-pages-aspnet-core\ContosoPizza\ContosoPizza.csproj]
Utilisation des paramètres de lancement à partir de C:\Users\pierr\Documents\Developpement\Microsoft_courses\mslearn-create-razor-pages-aspnet-core\ContosoPizza\Properties\launchSettings.json...
You must install or update .NET to run this application.
App: C:\Users\pierr\Documents\Developpement\Microsoft_courses\mslearn-create-razor-pages-aspnet-core\ContosoPizza\bin\Debug\net7.0\ContosoPizza.exe
Architecture: x64
Framework: 'Microsoft.AspNetCore.App', version '7.0.0' (x64)
.NET location: C:\Program Files\dotnet
The following frameworks were found:
9.0.4 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Learn more:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
dotnet watch ❌ [ContosoPizza (net7.0)] Exited with error code -2147450730
dotnet watch ⏳ Waiting for a file to change before restarting ..."
So I installed the runtime, but it's still not recognized... why ?
This question is related to the following Learning Module
C#
3 answers
Sort by: Most helpful
-
-
Bruce (SqlWork.com) 75,051 Reputation points
2025-04-27T15:57:01.9333333+00:00 The dotnet core runtimes install side by side. Also a dotnet core app is tied to the runtime it was built with. You appear to trying to run a .net 7 application with only the .net 9 runtime installed. .net 7 is no longer supported and your tutorial must be old.
you can download and install the unsupported .net 7 sdk, or update you sample code to .net 9.0 by changing the target in the project file. If using any nuget packages, you may need to update.
to determine installed versions:
dotnet —info
-
Pierre-Jean Martin 0 Reputation points
2025-04-28T16:58:55.2366667+00:00 Finally I went to the config and changed the runtime version... I'm ot sure it's the right solution but since it was for the tutorial, I imagine it's okay....