Visual Studio - Debug Executable Specified in the Debug Profile does not Exist
Solution 1
I tried multiple solutions for many days, but the only thing that worked for me was completely removing VS 2019 and then re-installing.
Solution 2
For me, all I needed to do was modify the Project Properties (right click the project in the Solution Explorer --> Project Properties), then under the Application tab, select an appropriate Target Framework. It was unset for me by default.
Solution 3
Copy the "cli" folder and rename it to "cli_x64". This works for me.
Solution 4
Solution for Azure Functions
- Make sure you have
azure-functions-core-tools
installed. - Open up your project's properties,
right-click project root | properties | Debug
You should see this: - Set the
Launch
toExecutable
- Set the
Executable
to the path of yourazure-functions-core-tools
executable - inAppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\func.exe
Solution 5
Like others here, (I upvoted a couple other answers) I tried multiple things for days and days, with no luck. In my case, a simple uninstall and reinstall of VS2019 didn't solve the problem. For me, the issue started with the VS2019 16.9.3 update, when suddenly projects that built fine before reported compile errors. The bizarre errors involved not being able to find references that were clearly there. I have a large solution with about 60 projects, of which 40 were .NET Framework 4.5.2, and 20 were .NET Core, a mix of 2.x, 3.x, and a few 5.x. At first, the compile errors affected both .NET Framework apps and .NET Core apps. I was not having this problem on my home computer, nor were my coworkers having this problem.
First, I updated all the .NET Framework apps in my solution from Framework 4.5.2 to 4.7.2. This seemed to solve it for the .NET Framework apps. However, the .NET Core apps still had ridiculous build errors, "System" not found, "NUnit" not found after creating a new test project using the NUnit3 VS template.
I tried tracking down potential NuGet configuration issues; I tried shortening the Win10 PATH statement, and nothing helped. Then, after the first uninstall/reinstall of VS2019 failed to make a difference, here is what I did that led to a successful result:
-
Removed all NuGet packages from the computer, using Package Manager Console, see instructions here: https://docs.microsoft.com/en-us/nuget/consume-packages/managing-the-global-packages-and-cache-folders
I used command: "dotnet nuget locals all -clear" -
Uninstalled VS2019, using the "Microsoft Visual Studio Installer" app
-
Uninstalled VS2017, using the "Microsoft Visual Studio Installer" app
-
Note: DO NOT uninstall the "Microsoft Visual Studio Installer" app yet!
-
Uninstalled all other prior VS versions (I had some crud from 2010 and even 2008) using Apps & features
-
Ran the VS "InstallCleanup.exe" tool described here: https://docs.microsoft.com/en-us/visualstudio/install/remove-visual-studio?view=vs-2019
-
Removed the "Microsoft Visual Studio Installer" app using Apps & features
-
Uninstalled all .NET SDKs and APIs, using --all option with the .NET Uninstall Tool see https://docs.microsoft.com/en-us/dotnet/core/additional-tools/uninstall-tool? and https://devblogs.microsoft.com/dotnet/announcing-the-net-core-uninstall-tool-1-0/tabs=macos
-
Uninstalled any & all remaining VS-related items showing in Apps & features, including some very old SDKs and Toolkits that were somehow on the "developer clone" PC my company issues
-
Downloaded and (re)installed the VS Installer tool
-
Using the VS Installer tool, reinstalled VS 2019
-
Reinstalled the VS extensions I use (I had captured my list of installed VS Extensions in screenshots before starting all this)
-
Rebooted once more...
After all this, all the issues that weren't working, all the "Are you missing a using directive or an assembly reference" errors were now gone! Naturally, the needed steps will vary, based on your computer, and some of the steps I did may not have been truly necessary. After several unproductive days of nothing fixing the issue, it was time to go all-in. What a relief to have Visual Studio "just work" again!
codesnerd
Updated on December 19, 2021Comments
-
codesnerd over 2 years
I am trying to run a simple HelloWorld C# .NET Core Console Application and I get this error. Being fairly new, I couldn't resolve it upon trying certain things mentioned in another answer. Please guide me on how to resolve it.
The error I get is:
The debug executable [PATH] specified in the [Project Name] debug profile does not exist.