I am currently using vscode for C# code debugging. I am currently using .net core 7.0 and I want to upgrade to .net core 8.0. I found the following Microsoft documentation webpage, but I have some doubts about the content and I don’t know how to proceed.
- The webpage says, “Update the .NET SDK version in global.json”, but it doesn’t mention where this file is located. When I enter “dotnet –info” in CMD, the output shows:
Environment variables: Not set
global.json file: Not found
I asked gpt, and it said, “If there is no global.json file in the project root directory, you can manually create one.” The problem is, I have many solutions. Do I have to create a new global.json file for each project? That seems like a lot of work!
- The webpage also says, “Update the target framework. Update the project file’s Target Framework Moniker (TFM) to net8.0.”
— My understanding of this statement is to update the .csproj file. But each solution has many .csproj files. Do I have to update all of them?
Gpt’s answer is, “Indeed, for solutions that contain multiple projects, manually updating each project’s .csproj file can be a lot of work. However, you can reduce the manual work by writing a script to update these files in bulk. Here are a few solutions that can help simplify this process.” I’m not entirely confident in gpt’s answer. There are many doubts and uncertainties in the upgrade process mentioned above. Is there any specific guidance or a simpler upgrade method? Or is there a video tutorial with detailed upgrade steps? If I completely uninstall the current 7.0 version and reinstall the 8.0 version, will it render all my current projects unusable? Or do I still need to manually update each solution and project file in vscode?