I need to develop cross platform solutions and am often working in Linux, so I have taken to using Visual Studio Code as my IDE instead of Visual Studio. I recently needed to preview some of the features in dotnet core 3 and found it somewhat confusing getting this configured to work with Visual Studio Code on Windows. Here are the steps I took to get it working.
- Install the dotnet core preview from here: https://dotnet.microsoft.com/download/dotnet-core/3.0 (I am running preivew 4)
After install, you will be able to create, build, and run projects from the command line.
- Update VS Code if needed (I am running 1.33.1)
- You have to have the C# extension for VS Code (mine is 1.19.0), install it if you don’t.
If you open a dotnet core 3 project at this point in VSCode, you will see red squiggles over object types, and AssemblyInfo.cs showing errors that it was not able to find ‘system’.
- Install the appropriate VS 2019 preview from here: https://visualstudio.microsoft.com/vs/preview/
This will solve the weird ‘not found’ errors. If you are like me and you don’t want to install over 10 Gb worth of stuff, you can choose to install only the “.Net Core cross-platform development” workload (you have to scroll down in the workloads tab of the installer). This requires a little over 2Gb.