C
C#10mo ago
zykw

global::System.Console.WriteLine(); error

Hi everyone I have problem with command Console.WriteLine, before I used this through cw + TAB, but now it doesn't work like before. What I should do to improve this?
No description
13 Replies
Kouhai
Kouhai10mo ago
You need semicolons ; on two lines Also why are you resolving the System namespace using global::, you don't need that
zykw
zykwOP10mo ago
semicolons doesnt help
No description
V0FBU1VM
V0FBU1VM10mo ago
Can you share your entire file?
zykw
zykwOP10mo ago
I'm trying to use simple command Console.WriteLine, but my PC adds global
V0FBU1VM
V0FBU1VM10mo ago
There might be some unnecessary imports, causing the issue.
zykw
zykwOP10mo ago
Wait
V0FBU1VM
V0FBU1VM10mo ago
Or do you happen to have a file named GlobalUsings.cs? You can disable global usings. I think that's what's causing the issue. In csproj file, add this line under <ImplicitUsings>disable</ImplicitUsings> <PropertyGroup>. Also remove global::System.Console.WriteLine();. But I would recommend fixing it instead of disabling it.
Buddy
Buddy10mo ago
$paste
MODiX
MODiX10mo ago
If your code is too long, you can post to https://paste.mod.gg/ and copy the link into chat for others to see your shared code!
SG97
SG9710mo ago
judging from the lack of red squigglies (errors), something is wrong with the project
Buddy
Buddy10mo ago
I wonder .. Have you opened it as a folder? Or did you open the csproj / sln file?
The Fog from Human Resources
The project definitely doesn't get loaded properly
Omnissiah
Omnissiah10mo ago
did you accidentally created a System.Console namespace?
Want results from more Discord servers?
Add your server