C
C#15mo 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
Angius15mo ago
Did you open a project or just a loose .cs file?
AstroLens
AstroLensOP15mo ago
project im guessing thats the problem
Angius
Angius15mo ago
No, that's good
AstroLens
AstroLensOP15mo ago
oh
Angius
Angius15mo ago
Could you show the screenshot of the solution explorer, or even just the whole VS window?
AstroLens
AstroLensOP15mo ago
like this?
No description
Angius
Angius15mo 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
AstroLensOP15mo ago
uhhh
No description
Angius
Angius15mo 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
AstroLensOP15mo ago
wait how do i check it?
Angius
Angius15mo ago
Open the .csproj file with Notepad or whatever
AstroLens
AstroLensOP15mo ago
Ohhh okay just gotta find the path
Angius
Angius15mo ago
It's exactly where you put it
AstroLens
AstroLensOP15mo ago
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>net5.0</TargetFramework> </PropertyGroup> </Project> net5.0
Angius
Angius15mo ago
Right, a three years old version... somehow
AstroLens
AstroLensOP15mo ago
hold up should i use 2022 version?
Angius
Angius15mo ago
Well, yes, preferably No reason to stay in the past
AstroLens
AstroLensOP15mo ago
... ok well
Angius
Angius15mo 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
AstroLensOP15mo 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
Angius15mo ago
Sure am What gave it away?
AstroLens
AstroLensOP15mo ago
yt channel
AstroLens
AstroLensOP15mo ago
No description
AstroLens
AstroLensOP15mo ago
thats polish
Angius
Angius15mo ago
Ah lol Still one of my best videos, apparently KEKW
AstroLens
AstroLensOP15mo ago
lmao you might have noticed polish text on the screenshot what i sent
AstroLens
AstroLensOP15mo ago
No description
AstroLens
AstroLensOP15mo ago
im from Poland too never thought that would happen "Odnistalowywanie"
Angius
Angius15mo ago
Honestly, didn't pay much attention to the language, I just looked for that missing project under the solution lol
AstroLens
AstroLensOP15mo 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
AstroLensOP15mo ago
No description
Accord
Accord15mo 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