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?
13 Replies
You need semicolons
;
on two lines
Also why are you resolving the System
namespace using global::
, you don't need thatsemicolons doesnt help
Can you share your entire file?
I'm trying to use simple command Console.WriteLine, but my PC adds global
There might be some unnecessary imports, causing the issue.
Wait
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.$paste
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!
judging from the lack of red squigglies (errors), something is wrong with the project
I wonder .. Have you opened it as a folder?
Or did you open the csproj / sln file?
The project definitely doesn't get loaded properly
did you accidentally created a System.Console namespace?