❔ Debugging a hello world console project with c# dev kit fails
MSBuild version 17.6.1+8ffc3fe3d for .NET
MSBUILD : error MSB1009: Project file does not exist.
dotnet build works just fine though.
37 Replies
following these instructions:
https://code.visualstudio.com/docs/csharp/get-started#_open-folder
Any ideas?
Get started with C# and .NET in Visual Studio Code
Getting Started with C# and .NET Development in Visual Studio Code
Did you open the cs file in VSCode, or the whole folder?
the folder then i go to the cs file
After those errors it shows:
Switch: c:PathToFilec#csharp-helloConsoleAppConsoleApp.csproj
with no slashes
Does your path actually have a
#
in it?yes
Try moving it to somewhere without a
#
in it?got rid of it and still same issue
all I'm doing is this
Have you tried doing the recommended one?
same issue unfortunately
actually nothing at all happens when i use that one
To be clear, you have both the C# and DevKit extensions installed?
And its succesfully loaded your solution?
yes, if I do dotnet build and point to the csproj file it works just fine
but not debugging
No no. Not
dotnet build
from the command line
Has devkit successfully loaded your solution?
Do you have completion? Quick info?ok
hmm let's see
where do I look for quick info?
Just hover over something
void Console.WriteLine(string? value) (+ 17 overloads)
Writes the specified string value, followed by the current line terminator, to the standard output stream.
Exceptions:
IOException
And your project is visible in solution explorer?
if I right click and select this:
same issue
Is this just plain windows? No docker or anything like that? Any spaces in your path?
sorry about was commuting
yeah, plain windows, the terminal is running git bash
@333fred
wow I figured it out
I tried running the same command myself
it needs to escape each slash in the url path, I ran the same command it runs and it didn't work at first but after escaping it did
but not sure how I can get it to do it on its own
What do you have this setting on?
internalConsole
Hmm. I would say please file a bug
it's bash for sure, it doesn't like the slashes, if I use the other slashes I bet it works. Unfortunatley it doesn't let me change it to cmd just for this
Yeah, please do help -> report issue on DevKit for this
And make sure to include the info about using git bash
sure
thank you for the help
just tried by changing console to cmd, no problem
looks like someone reported this already:
https://github.com/microsoft/vscode-dotnettools/issues/253
GitHub
C# Dev Kit does not run tests in any test projects. · Issue #253 · ...
Type: Bug Steps to Reproduce Open a functional solution with test projects using XUnit. a. Locally, my projects are targeting .NET Framework 4.8 in SDK format. b. Updating to a new .NET version is ...
Oh look it's @Hazel | へいぜる
Lol just lookin out 😄
I just pinged Tom on teams and will let you know if he has anything to say
Switch your default terminal to Powershell or something other than Bash; they have yet to fix it 😭
But he's in a meeting right now so I don't expect an immediate answer
I've been waiting weeks at this point lol
yeah I switched it for the workspace.
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.