C
C#2y ago
AstroLens

❔ I want to start coding in C# but in visual studio 2019 i can only attach not debug the code

Can anyone help me with debuging the code?
32 Replies
Angius
Angius2y ago
Did you open a project or just a loose .cs file?
AstroLens
AstroLensOP2y ago
project im guessing thats the problem
Angius
Angius2y ago
No, that's good
AstroLens
AstroLensOP2y ago
oh
Angius
Angius2y ago
Could you show the screenshot of the solution explorer, or even just the whole VS window?
AstroLens
AstroLensOP2y ago
like this?
No description
Angius
Angius2y ago
Ah, I see the issue, I think No clue why, but it happens surprisingly often. The solution has no projects associated with it Right-click the solution, add existing item, and point towards the .csproj file of your project
AstroLens
AstroLensOP2y ago
uhhh
No description
Angius
Angius2y ago
Ah, well, seems like you might not have the correct SDK installed... somehow VS should install it all for you, odd What framework version does the project need? It's in the .csproj file
AstroLens
AstroLensOP2y ago
wait how do i check it?
Angius
Angius2y ago
Open the .csproj file with Notepad or whatever
AstroLens
AstroLensOP2y ago
Ohhh okay just gotta find the path
Angius
Angius2y ago
It's exactly where you put it
AstroLens
AstroLensOP2y ago
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>net5.0</TargetFramework> </PropertyGroup> </Project> net5.0
Angius
Angius2y ago
Right, a three years old version... somehow
AstroLens
AstroLensOP2y ago
hold up should i use 2022 version?
Angius
Angius2y ago
Well, yes, preferably No reason to stay in the past
AstroLens
AstroLensOP2y ago
... ok well
Angius
Angius2y ago
VS 2022 .NET 7 C# 11 Those are the current versions Later this year, in a couple of months, it'll be .NET 8 and C# 12
AstroLens
AstroLensOP2y ago
bruh vs 2022 is not responding when i open or create a project nevermind oh great i dont have c# installed on the 2022 version that will take a while to install 🙃 @angius are you from Poland?
Angius
Angius2y ago
Sure am What gave it away?
AstroLens
AstroLensOP2y ago
yt channel
AstroLens
AstroLensOP2y ago
No description
AstroLens
AstroLensOP2y ago
thats polish
Angius
Angius2y ago
Ah lol Still one of my best videos, apparently KEKW
AstroLens
AstroLensOP2y ago
lmao you might have noticed polish text on the screenshot what i sent
AstroLens
AstroLensOP2y ago
No description
AstroLens
AstroLensOP2y ago
im from Poland too never thought that would happen "Odnistalowywanie"
Angius
Angius2y ago
Honestly, didn't pay much attention to the language, I just looked for that missing project under the solution lol
AstroLens
AstroLensOP2y ago
yeah makes sense if you wanna help lol oh great... a 1.70 gb update somehow i gained 5 gb of space on my laptop alright soo i have installed the newer version of vs and now i can debug thank you for actually saying something about the version of the vs what i was using being old
AstroLens
AstroLensOP2y ago
No description
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?