Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 99078

C# Error CS0234 even after adding aspnetcore and extensions packages

$
0
0

I have a C# code that I am trying to run on VS Code. The steps I went through are as follows:

  1. create folder (for this case we will name it "Program") for the program files and then run

dotnet new console

  1. 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)

  2. Run the following commands to add packages:

dotnet add package aspnetcore

dotnet add package extensions

All packages above were installed successfully

  1. 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


Viewing all articles
Browse latest Browse all 99078

Trending Articles