C
C#15mo 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
reflectronic15mo ago
C# is case-sensitive console is not the same thing as Console
CoolBlu_e
CoolBlu_eOP15mo ago
oh
Angius
Angius15mo ago
Your editor should've highlighted that in red, too To let you know before you even compiled it
CoolBlu_e
CoolBlu_eOP15mo ago
nope it's just the reg blue
Angius
Angius15mo ago
What are you using?
CoolBlu_e
CoolBlu_eOP15mo ago
vs
Angius
Angius15mo ago
VS or VS Code?
Buddy
Buddy15mo ago
Prefer Visual Studio over VSCode. (Saw your issue in Chat)
CoolBlu_e
CoolBlu_eOP15mo ago
ok! vscode
Buddy
Buddy15mo ago
VSCode is a lot of manual work and just not worth it.
Angius
Angius15mo 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
Buddy15mo 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_eOP15mo ago
im a mac user :/
Angius
Angius15mo ago
Ah oof my condolences Microsoft just sunset VS4Mac lol
Buddy
Buddy15mo ago
Rider is currently -65% off rn for new users
CoolBlu_e
CoolBlu_eOP15mo ago
and i dont like bothering with bootcamp when i dualboot into window my computer = jet engine
Angius
Angius15mo ago
Then, yeah, Rider is your best option VS Code + DevKit as a last resort
Buddy
Buddy15mo 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
Angius15mo ago
Alternatively, $freerider
MODiX
MODiX15mo 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
Buddy15mo 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_eOP15mo ago
so far it's been workign well for me besides that one error
MODiX
MODiX15mo 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
Buddy15mo 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
Azrael15mo ago
I get them for free 🐸
Want results from more Discord servers?
Add your server