I have a C# code that I am trying to run on VS Code. The steps I went through are as follows:
- create folder (for this case we will name it "Program") for the program files and then run
dotnet new console
Replace the Program.cs file inside the "Program" folder with the Program.cs file I intend to run ( I did this with earlier C# applications and it worked)
Run the following commands to add packages:
dotnet add package aspnetcore
dotnet add package extensions
All packages above were installed successfully
- I ran the command
dotnet build
but received the following errors:
error CS0234: The type or namespace name 'AspNetCore' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
error CS0234: The type or namespace name 'AspNetCore' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
Please tell me how I am to resolve this issue. Thank you