Things are moving so fast nowadays that it's hard for tutorials and blog posts to keep up.
It also doesn't help when your products have extremely similar names.
Since Visual Studio 2019 came out a few days ago I want to try to make a simple console application on .NET Core 3 (not ASP.NET Core).
I installed .NET Core SDK 3.0.100-preview3-010431 from here. However I am having trouble actually creating a project from inside the new VS or by editing the .csproj
file, as my application crashes if I do the latter.
What would be the process to either:
1. Create a .NET Core 3 console application
OR
2. Create a .NET Core 3 console application with Visual Studio 2019 Community
Open Visual Studio, and choose Create a new project in the Start window. In the Create a new project window, select All languages, and then choose C# from the dropdown list. Choose Windows from the All platforms list, and choose Console from the All project types list.
The simplest way to create a .NET Core console app is from the command line. Navigate to your code folder, and then (assuming your app is named MyApp):
md MyApp
cd MyApp
dotnet new sln
md MyApp
cd MyApp [now you are in MyApp\MyApp]
dotnet new console
cd ..
dotnet sln add MyApp
This gives you a solution file, MyApp.sln, and a folder MyApp containing MyApp.csproj, which is part of the MyApp solution. Now you can open the solution with Visual Studio 2019 and start coding.
If this doesn't use the right .NET Core version, then from within your root MyApp folder, run
dotnet --version
and see what it says.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With