✅ Can't run my code in Visual studios
So basically i'm a complete begginer when it comes to coding and i'm currently trying to use visual studios. Yet, when i try to run my code using f5 nothing happens. When i try to run it using the green button that's supposed to make it run all that pops up is a window that shows a bunch of my files. The window is titled "attach to process" so i'm guessing that i have to attach a process to my project however i have no idea how to do that or what a process even is. So, how do i make my code run?
This might not be the right place to ask about visual studios but i didn't know where else to go. Thank u in advance.
36 Replies
screenshot of your vs

You don't have a project in your solution
You only have a single, separate file open
idk if this is how it's supposed to be fixed but when i click add -> existing project -> the project that i want to add, this shows up

Right click solution(tab on the right) > add > new project > console app
should look like this

this happens when i try to create a new project according to ur instructions

Can you open up terminal and paste this
(visual studio>View tab>terminal)

it should respond like this

doesn't seem to respond at all

-okay you are lacking .net SDK, you need to install it. close down visual studio.
-download link https://dotnet.microsoft.com/en-us/download
-after installation, open visual studio installer and look up to .NET desktop development is checked, if not check it
(if you want to develop web apps, check that box too)
-apply/install/download idk what the button is in english
-then open up your solution again and try to list SDKs again
Microsoft
Download .NET (Linux, macOS, and Windows) | .NET
Free downloads for building and running .NET apps on Linux, macOS, and Windows. Runtimes, SDKs, and developer packs for .NET Framework, .NET, and ASP.NET.
* Open
powershell
in a terminal in admin mode as in the following video:
https://cdn.discordapp.com/attachments/569261465463160900/1157744344183341156/20230930-1822-10.7436061.mp4
* copy/paste the following script:
in case of an invalid setup detected, it will:
* tell you that it did (or not) detected an invalid Path
setup
* in case some action are require it will ask you to Press Enter to confirm
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
i have now downloaded it and .net is checked but nothinf has changed
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View

Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
when i clicked on the link i installed the 9.0 version
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View

Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
* Open
powershell
in a terminal in admin mode as in the following video:
https://cdn.discordapp.com/attachments/569261465463160900/1157744344183341156/20230930-1822-10.7436061.mp4
* copy/paste the following script:
in case of an invalid setup detected, it will:
* tell you that it did (or not) detected an invalid Path
setup
* in case some action are require it will ask you to Press Enter to confirm
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
for some reason i can't screenshot it but this is what it says: Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
PS C:\WINDOWS\system32> iex "& { $(irm https://gist.githubusercontent.com/tebeco/5c6cc0eee8c28fad3523008d58f83914/raw/d14890f540ae74ad72d950c48f6a242e9401d31e/fix-dotnet-path.ps1) }"
**
If you're seing this message your SYS PATH is improperly set
**
Your Old PATH was:
C:\Program Files\Common Files\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0;C:\windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\dotnet;C:\Program Files\dotnet;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;%SYSTEMROOT%\System32\OpenSSH\
**
Your New PATH will be:
C:\Program Files\Common Files\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0;C:\windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\dotnet;C:\Program Files\dotnet;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;%SYSTEMROOT%\System32\OpenSSH\
Press enter to continue (Ctrl+C to ABORT)
Installing PowerShell on Windows - PowerShell
Information about installing PowerShell on Windows
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
one second
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
i pressed enter and this is what showed up:
**
PS C:\WINDOWS\system32>
(with more "stars")
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
ok

Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
If you have no further questions, please use /close to mark the forum thread as answered
it's working, tysm!
oh i see, another program/software installed x86 before before he installed visual studio