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