C
C#10mo ago
CoolBlu_e

new to c#

when I run dotnet run this code
using System;

namespace project_acsv
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
console.ReadKey();
}
}
}
using System;

namespace project_acsv
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
console.ReadKey();
}
}
}
it sends
/Users/myusername/Desktop/project acsv/Program.cs(10,13): error CS0103: The name 'console' does not exist in the current context [/Users/myusername/Desktop/project acsv/project acsv.csproj]

The build failed. Fix the build errors and run again.
/Users/myusername/Desktop/project acsv/Program.cs(10,13): error CS0103: The name 'console' does not exist in the current context [/Users/myusername/Desktop/project acsv/project acsv.csproj]

The build failed. Fix the build errors and run again.
25 Replies
reflectronic
reflectronic10mo ago
C# is case-sensitive console is not the same thing as Console
CoolBlu_e
CoolBlu_e10mo ago
oh
Angius
Angius10mo ago
Your editor should've highlighted that in red, too To let you know before you even compiled it
CoolBlu_e
CoolBlu_e10mo ago
nope it's just the reg blue
Angius
Angius10mo ago
What are you using?
CoolBlu_e
CoolBlu_e10mo ago
vs
Angius
Angius10mo ago
VS or VS Code?
Buddy
Buddy10mo ago
Prefer Visual Studio over VSCode. (Saw your issue in Chat)
CoolBlu_e
CoolBlu_e10mo ago
ok! vscode
Buddy
Buddy10mo ago
VSCode is a lot of manual work and just not worth it.
Angius
Angius10mo ago
Then, yeah, prefer Visual Studio 2022 VS Code is only really good if you don't use Windows and don't want to pay for Rider
Buddy
Buddy10mo ago
As Visual Studio (not code) helps you a lot, as the tooling comes bundled up because it's an IDE. You do need to install the module .NET Desktop Development module for things to fully work with .NET, but you'll be set from there. VSCode is great for advanced users as many of them don't need the extra help that normal users want. They just need very minimal help.
CoolBlu_e
CoolBlu_e10mo ago
im a mac user :/
Angius
Angius10mo ago
Ah oof my condolences Microsoft just sunset VS4Mac lol
Buddy
Buddy10mo ago
Rider is currently -65% off rn for new users
CoolBlu_e
CoolBlu_e10mo ago
and i dont like bothering with bootcamp when i dualboot into window my computer = jet engine
Angius
Angius10mo ago
Then, yeah, Rider is your best option VS Code + DevKit as a last resort
Buddy
Buddy10mo ago
JetBrains: Developer Tools for Professionals and Teams
Get Rider with 65% off
Following the announcement of Visual Studio for Mac’s retirement, we are offering a 65% discount on new subscriptions for Rider, the only cross-platform .NET IDE.
Angius
Angius10mo ago
Alternatively, $freerider
MODiX
MODiX10mo ago
There are two ways to get Rider for free: Being a student: https://www.jetbrains.com/community/education/#students Using it for an OSS project: https://www.jetbrains.com/community/opensource/#support
Buddy
Buddy10mo ago
EAP is free and commercially usable too, but it isn't available 100% of the time as it's only a public test for all the major updates. You also need to renew it every 30th day I believe.
CoolBlu_e
CoolBlu_e10mo ago
so far it's been workign well for me besides that one error
MODiX
MODiX10mo ago
CoolBlu_e
does anyone know how to fix Could not locate .NET Core project in 'project acsv'. Assets were not generated. when i run generate assets for build and debug
Quoted by
<@647189712049537027> from #chat (click here)
React with ❌ to remove this embed.
Buddy
Buddy10mo ago
Alright, just so you know that you have an option in the blobthumbsup been paying for JetBrains all products pack for 3 years, I love them because it's all uniform for all platforms, no significant difference (if at all). As it supports all desktop platforms (Linux, Mac and Windows), makes it an awesome platform if you are interested in an IDE for Mac. Rider does stink for anything GUI related such as MAUI. But other than that, it's great. Avalonia (GUI Framework) is an exception.
Azrael
Azrael10mo ago
I get them for free 🐸