Hi i'm learning c# but when i run my first app with visual studio code i've this code
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
How can i go back to the old template?
CodePudding user response:
Here is the easiest way to do it:
- Create a new console application targeting .NET5
- Right click on your project and find Edit project file. Click into that.
- Optional: Change
<TargetFramework>net5.0</TargetFramework>
to<TargetFramework>net6.0</TargetFramework>
- Save changes.
Done. By taking those steps, you start with the old template and if you want to target the new .NET6 framework, step 3 is how you can do that.
Edit: Optionally, steps 2 & 3 can also be done as follows:
- Right click on your project and click on Properties
- Optional: Under tabs
Application
>General
findTarget framework
. Click the dropdown and choose .NET6