C
C#2y ago
scac

❔ 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
scac
scacOP2y ago
Get started with C# and .NET in Visual Studio Code
Getting Started with C# and .NET Development in Visual Studio Code
333fred
333fred2y ago
Did you open the cs file in VSCode, or the whole folder?
scac
scacOP2y ago
the folder then i go to the cs file After those errors it shows: Switch: c:PathToFilec#csharp-helloConsoleAppConsoleApp.csproj with no slashes
333fred
333fred2y ago
Does your path actually have a # in it?
scac
scacOP2y ago
yes
333fred
333fred2y ago
Try moving it to somewhere without a # in it?
scac
scacOP2y ago
got rid of it and still same issue
scac
scacOP2y ago
all I'm doing is this
333fred
333fred2y ago
Have you tried doing the recommended one?
scac
scacOP2y ago
same issue unfortunately actually nothing at all happens when i use that one
333fred
333fred2y ago
To be clear, you have both the C# and DevKit extensions installed? And its succesfully loaded your solution?
scac
scacOP2y ago
yes, if I do dotnet build and point to the csproj file it works just fine but not debugging
333fred
333fred2y ago
No no. Not dotnet build from the command line Has devkit successfully loaded your solution? Do you have completion? Quick info?
scac
scacOP2y ago
scac
scacOP2y ago
ok hmm let's see where do I look for quick info?
333fred
333fred2y ago
Just hover over something
scac
scacOP2y ago
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
333fred
333fred2y ago
And your project is visible in solution explorer?
scac
scacOP2y ago
scac
scacOP2y ago
if I right click and select this: same issue
333fred
333fred2y ago
Is this just plain windows? No docker or anything like that? Any spaces in your path?
scac
scacOP2y ago
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
333fred
333fred2y ago
What do you have this setting on?
scac
scacOP2y ago
internalConsole
333fred
333fred2y ago
Hmm. I would say please file a bug
scac
scacOP2y ago
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
333fred
333fred2y ago
Yeah, please do help -> report issue on DevKit for this And make sure to include the info about using git bash
scac
scacOP2y ago
sure thank you for the help just tried by changing console to cmd, no problem
scac
scacOP2y ago
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 ...
333fred
333fred2y ago
Oh look it's @Hazel | へいぜる
Hazel 🌊💃
Lol just lookin out 😄
333fred
333fred2y ago
I just pinged Tom on teams and will let you know if he has anything to say
Hazel 🌊💃
Switch your default terminal to Powershell or something other than Bash; they have yet to fix it 😭
333fred
333fred2y ago
But he's in a meeting right now so I don't expect an immediate answer
Hazel 🌊💃
I've been waiting weeks at this point lol
scac
scacOP2y ago
yeah I switched it for the workspace.
Accord
Accord2y ago
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.

Did you find this page helpful?