Ошибка исполняемый файл для отладки не существует

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://learn.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://learn.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://learn.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!

75 / 35 / 17

Регистрация: 24.07.2014

Сообщений: 357

1

Исполняемый файл для отладки, указанный в профиле отладки, не существует

26.05.2020, 17:06. Показов 15236. Ответов 1


После того как удалил папку с частью ненужных исходных кодов, вылезла эта ошибка. Восстановление файлов ситуации уже не меняет. Что делать?

Исполняемый файл для отладки, указанный в профиле отладки, не существует

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь

0

Администратор

Эксперт .NET

15226 / 12265 / 4902

Регистрация: 17.03.2014

Сообщений: 24,867

Записей в блоге: 1

27.05.2020, 01:10

2

Справлюсь, в окне Вывод видно что проект откомпилировался с ошибками. Открой окно «Список ошибок» и исправь их.

1

IT_Exp

Эксперт

87844 / 49110 / 22898

Регистрация: 17.06.2006

Сообщений: 92,604

27.05.2020, 01:10

Помогаю со студенческими работами здесь

Инструменты для отладки
Подскажите, есть ли такой инструмент для php, который показывает построчно выполнение кода php,…

Компиляция для отладки
Когда я выполняю отладку, функции, экспортируемые из kernel32.dll имеют свои имена, которые четко…

Использование Firebug для отладки
Подскажите пожалуйста как им пользоваться для отладки javascript кода. Нажимаю на вкладку сценарий…

Что лучше для отладки?
Имеется VS2013 Express, FAR,WinDbg,Hiew,MAsm? Пробовал отлаживать но стоит WIn7 x64? Написал…

Планшет не видится для отладки
Добрый день.
Есть планшет DNS e73, который при рождении, видимо, был hyndai a7hd. На нем…

вывод значений для отладки
Имеется процедура SQL, в которой есть несколько Select"ов, расчеты. Эта процедура вызывается из…

Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:

2

  • Remove From My Forums
  • Вопрос

  • Появилась такая проблема сразу после установки…. При создании проэкта(например простое консольное приложение на Сишарпе)и при попытке запустить дебагинг выдает:  не удается начать отладку так как отсутствует объект отладки…. попробуйте перестроить
    проэкт или установить QouputPath и AsemblyName так, что бы они указывали на окончательную сборку. (все что после точек я на память написал), я много раз перестраивал, делал другие проэкты, одно и то же…  Студия создает все фалы, кроме .exe файла….

    Переустанавливал студию 2 раза. Делал 3 исправления установки, не помогает…. Сбрасывал настройки по умолчанию.

    Как исправить данную проблему?

    Среда: Microsoft Visual Studio 2012(x32) Profesional

    ОС: MS Windows 7 x64 ultimate

    • Изменено

      4 октября 2012 г. 11:18

    • Изменен тип
      PsyChokam
      4 октября 2012 г. 17:56

Ответы

  • Проверьте в свойствах проекта на вкладке Build есть настройка Output Path, там должен быть задан существующий путь в который должен быть собран EXE файл.

    AssemblyName указывается там же, только на первой вкладке Application (как правило оно совпадает с именем вашего проекта). Проверьте что и оно задано.

    Так же было бы полезным, если вы создадите пустое консольное приложение (которое у вас не получается собрать) и выложите его на файл-хостинг, а ссылку опубликуете здесь, для того чтобы была возможность проверить его работоспособность.

    Спасибо.


    Для связи [mail]

    • Помечено в качестве ответа
      Abolmasov Dmitry
      17 октября 2012 г. 11:57

I am fairly new to C#..

I am using Visual Studio 12, the source I am using was last edited in VS 12.. But my problem is that it’s throwing me this error:
enter image description here

First of all, my computer username isn’t Martin, it is Administratoring — The creator of this project is Martin.. So that’s where I guess it’s coming from, but I don’t know how to fix this.

I have tried editing in Project > Properties > Build > Output Path — And it still doesn’t work. I am not too familiar with C#, and I’ve spent some time searching up for a solution but can’t find it anywhere.. Probably because I don’t know what I should be searching up (I’ve tried searching keywords and quotes from the error, but still nothing)

asked Dec 13, 2013 at 10:03

Reverb's user avatar

ReverbReverb

9132 gold badges12 silver badges17 bronze badges

0

Try these:

  1. Make sure that output path of project is correct (Project > Properties > Build > Output path)

  2. Go in menu to Build > Configuration Manager, and check if your main/entry project has checked Build. If not, check it.

phuclv's user avatar

phuclv

35.9k13 gold badges146 silver badges455 bronze badges

answered Dec 13, 2013 at 10:10

Dibin's user avatar

DibinDibin

1,4981 gold badge15 silver badges18 bronze badges

3

For those with this kind of problem — another solution:
Pay attention also to Warnings when you build solution. For example, I had referenced a dll built with higher version of .NET (4.5.2) than my main project (4.5)
After I referenced a dll built with 4.0 build process was successful.

answered Oct 28, 2016 at 6:58

Neno's user avatar

NenoNeno

7073 gold badges20 silver badges33 bronze badges

1

Please try with the steps below:

  1. Right click on the Visual Studio Project — Properties — Debug — (Start Action section) — select «Start project» radio button.
  2. Right click on the Visual Studio Project — Properties — Debug — (Enable Debuggers section) — mark «Enable the Visual Studio hosting process»
  3. Save changes Ctrl + Shift + S) and run the project again.

P.S. I experienced the same problem when I was playing with the options to redirect the console input / output to text file and have selected the option Properties — Debug — (Start Action section) — Start external program. When I moved the Solution to another location on my computer the problem occurred because it was searching for an absolute path to the executable file. Restoring the Visual Studio Project default settings (see above) fixed the problem. For your reference I am using Visual Studio 2013 Professional.

Philipp M's user avatar

Philipp M

1,8677 gold badges27 silver badges38 bronze badges

answered Aug 9, 2014 at 17:13

Ivaylo Botusharov's user avatar

I had the same problem and unfortunately non of above answers worked for me . the solution that worked for me is :

right click on your startup project and select Properties — Debug and change «start external program: » to the correct path

Done!

answered Dec 30, 2015 at 10:45

Shima.Y's user avatar

Shima.YShima.Y

3634 gold badges9 silver badges18 bronze badges

0

Application Property

Switch Target framework to 4.5.2 or something higher and bring it back to your original version (example: 4.5) then when you build, it will work.

answered Jan 3, 2020 at 6:34

Ranch Camal's user avatar

Ranch CamalRanch Camal

4811 gold badge4 silver badges11 bronze badges

You are not set the startup project so only this error occur. Mostly this problem occur when your working with more project in the single solution.

First right click on your project and «Set as Start Up Project» and/or right click on the start up file inside the selected project and click «Set StartUp File».

answered Jun 26, 2015 at 4:01

Merbin Joe's user avatar

Merbin JoeMerbin Joe

6015 silver badges27 bronze badges

I also get this error quite often.

I solve this by modifying the code (doing a very small change), saving it, then building the solution again.

answered Jul 10, 2015 at 8:31

Szabolcs Antal's user avatar

Szabolcs AntalSzabolcs Antal

8584 gold badges13 silver badges27 bronze badges

In my case I had added a project to a solution manually, where that project was targeting a higher .NET version than the rest of the projects that were referencing it. Strange… there would normally be a somewhat more verbose, literal and descriptive error in such cases.

There wasn’t a real error but there was a warning that said as much.

answered Aug 10, 2016 at 12:53

Wim Ombelets's user avatar

Wim OmbeletsWim Ombelets

4,9373 gold badges40 silver badges54 bronze badges

Go to Project > properties > Debug Tab and set the Launch to «Project»

answered Mar 6, 2020 at 17:49

Khareem's user avatar

I had the same problems. I had to change file rights. Unmark «read only» in their properties.

answered Aug 28, 2015 at 13:02

olq's user avatar

olqolq

1411 gold badge2 silver badges9 bronze badges

So… it’s mid 2021 and I’m using visual Studio 2019 (version 16.10.2) which is the current version available, on a windows 10 pc.

I had to start a new project and following this steps solved the issue;

  1. When at the menu that says “Create new project”
  2. After you’ve selected your project template it takes you to another menu that says “Configure your new project”
  3. On this menu there’s an option that says “Place solution and project in the same directory”.
  4. By default this option was not checked, so I checked it and it solved the issue.

answered Jun 28, 2021 at 9:41

Divinity's user avatar

DivinityDivinity

931 silver badge7 bronze badges

I had the same problem with visual studio 2015 , and I found that there is reference is marked so I just deleted it , maybe you can delete this reference or reinstall it again

answered Oct 25, 2021 at 21:20

Darwiesh Mustafa's user avatar

What solved it for me was deleting the line

<ImplicitUsings>enable</ImplicitUsings>

from the project property file. It caused Visual Studio to generate a (useless) file with multiple global using directive.

answered Mar 21, 2022 at 15:34

jonadv's user avatar

jonadvjonadv

3842 silver badges16 bronze badges

I faced the same problem , but in my solution i had many projects so in the solution configuration the start up project was by mistake a class library i changed the startup project and then i worked like a charm

right click on the sln => common proprties => choose right startup project .

answered May 27, 2022 at 11:45

Dark Storm's user avatar

I am fairly new to C#..

I am using Visual Studio 12, the source I am using was last edited in VS 12.. But my problem is that it’s throwing me this error:
enter image description here

First of all, my computer username isn’t Martin, it is Administratoring — The creator of this project is Martin.. So that’s where I guess it’s coming from, but I don’t know how to fix this.

I have tried editing in Project > Properties > Build > Output Path — And it still doesn’t work. I am not too familiar with C#, and I’ve spent some time searching up for a solution but can’t find it anywhere.. Probably because I don’t know what I should be searching up (I’ve tried searching keywords and quotes from the error, but still nothing)

asked Dec 13, 2013 at 10:03

Reverb's user avatar

ReverbReverb

9132 gold badges12 silver badges17 bronze badges

0

Try these:

  1. Make sure that output path of project is correct (Project > Properties > Build > Output path)

  2. Go in menu to Build > Configuration Manager, and check if your main/entry project has checked Build. If not, check it.

phuclv's user avatar

phuclv

35.9k13 gold badges146 silver badges455 bronze badges

answered Dec 13, 2013 at 10:10

Dibin's user avatar

DibinDibin

1,4981 gold badge15 silver badges18 bronze badges

3

For those with this kind of problem — another solution:
Pay attention also to Warnings when you build solution. For example, I had referenced a dll built with higher version of .NET (4.5.2) than my main project (4.5)
After I referenced a dll built with 4.0 build process was successful.

answered Oct 28, 2016 at 6:58

Neno's user avatar

NenoNeno

7073 gold badges20 silver badges33 bronze badges

1

Please try with the steps below:

  1. Right click on the Visual Studio Project — Properties — Debug — (Start Action section) — select «Start project» radio button.
  2. Right click on the Visual Studio Project — Properties — Debug — (Enable Debuggers section) — mark «Enable the Visual Studio hosting process»
  3. Save changes Ctrl + Shift + S) and run the project again.

P.S. I experienced the same problem when I was playing with the options to redirect the console input / output to text file and have selected the option Properties — Debug — (Start Action section) — Start external program. When I moved the Solution to another location on my computer the problem occurred because it was searching for an absolute path to the executable file. Restoring the Visual Studio Project default settings (see above) fixed the problem. For your reference I am using Visual Studio 2013 Professional.

Philipp M's user avatar

Philipp M

1,8677 gold badges27 silver badges38 bronze badges

answered Aug 9, 2014 at 17:13

Ivaylo Botusharov's user avatar

I had the same problem and unfortunately non of above answers worked for me . the solution that worked for me is :

right click on your startup project and select Properties — Debug and change «start external program: » to the correct path

Done!

answered Dec 30, 2015 at 10:45

Shima.Y's user avatar

Shima.YShima.Y

3634 gold badges9 silver badges18 bronze badges

0

Application Property

Switch Target framework to 4.5.2 or something higher and bring it back to your original version (example: 4.5) then when you build, it will work.

answered Jan 3, 2020 at 6:34

Ranch Camal's user avatar

Ranch CamalRanch Camal

4811 gold badge4 silver badges11 bronze badges

You are not set the startup project so only this error occur. Mostly this problem occur when your working with more project in the single solution.

First right click on your project and «Set as Start Up Project» and/or right click on the start up file inside the selected project and click «Set StartUp File».

answered Jun 26, 2015 at 4:01

Merbin Joe's user avatar

Merbin JoeMerbin Joe

6015 silver badges27 bronze badges

I also get this error quite often.

I solve this by modifying the code (doing a very small change), saving it, then building the solution again.

answered Jul 10, 2015 at 8:31

Szabolcs Antal's user avatar

Szabolcs AntalSzabolcs Antal

8584 gold badges13 silver badges27 bronze badges

In my case I had added a project to a solution manually, where that project was targeting a higher .NET version than the rest of the projects that were referencing it. Strange… there would normally be a somewhat more verbose, literal and descriptive error in such cases.

There wasn’t a real error but there was a warning that said as much.

answered Aug 10, 2016 at 12:53

Wim Ombelets's user avatar

Wim OmbeletsWim Ombelets

4,9373 gold badges40 silver badges54 bronze badges

Go to Project > properties > Debug Tab and set the Launch to «Project»

answered Mar 6, 2020 at 17:49

Khareem's user avatar

I had the same problems. I had to change file rights. Unmark «read only» in their properties.

answered Aug 28, 2015 at 13:02

olq's user avatar

olqolq

1411 gold badge2 silver badges9 bronze badges

So… it’s mid 2021 and I’m using visual Studio 2019 (version 16.10.2) which is the current version available, on a windows 10 pc.

I had to start a new project and following this steps solved the issue;

  1. When at the menu that says “Create new project”
  2. After you’ve selected your project template it takes you to another menu that says “Configure your new project”
  3. On this menu there’s an option that says “Place solution and project in the same directory”.
  4. By default this option was not checked, so I checked it and it solved the issue.

answered Jun 28, 2021 at 9:41

Divinity's user avatar

DivinityDivinity

931 silver badge7 bronze badges

I had the same problem with visual studio 2015 , and I found that there is reference is marked so I just deleted it , maybe you can delete this reference or reinstall it again

answered Oct 25, 2021 at 21:20

Darwiesh Mustafa's user avatar

What solved it for me was deleting the line

<ImplicitUsings>enable</ImplicitUsings>

from the project property file. It caused Visual Studio to generate a (useless) file with multiple global using directive.

answered Mar 21, 2022 at 15:34

jonadv's user avatar

jonadvjonadv

3842 silver badges16 bronze badges

I faced the same problem , but in my solution i had many projects so in the solution configuration the start up project was by mistake a class library i changed the startup project and then i worked like a charm

right click on the sln => common proprties => choose right startup project .

answered May 27, 2022 at 11:45

Dark Storm's user avatar

I have a very simple C++ application.

#include <stdio.h>
#include <iostream>

int main(int argc, char argv[]) {
  cout << "hi" << endl;
}

When I compile for the first time in debug mode, Visual Studio complains «Unable to start program ..Debugmyprogram.exe. The system cannot find the file specified.»

However, I think that this is obvious because I am compiling for the first time, right? This executable should not exist yet, so why is Visual Studio balking at compiling?

Thanks for your help.

Also, when I build, the following log appears:

When I build (Build->Build solution.), this log appears:

1>------ Build started: Project: print_digits, Configuration: Debug Win32 ------
1>Build started 12/23/2011 4:32:17 PM.
1>InitializeBuildStatus:
1>  Creating "Debugprint_digits.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>FinalizeBuildStatus:
1>  Deleting file "Debugprint_digits.unsuccessfulbuild".
1>  Touching "Debugprint_digits.lastbuildstate".
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:00.08

It says build succeeded, but no executable is being built for some reason.

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://learn.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://learn.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://learn.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!

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://learn.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://learn.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://learn.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!

У меня очень простое приложение на С++.

#include <stdio.h>
#include <iostream>

int main(int argc, char argv[]) {
  cout << "hi" << endl;
}

Когда я впервые скомпилирован в режиме отладки, Visual Studio жалуется «Невозможно запустить программу.. Debugmyprogram.exe. Система не может найти указанный файл».

Однако, я думаю, что это очевидно, потому что я собираюсь в первый раз, правильно? Этот исполняемый файл еще не существует, поэтому почему компиляция Visual Studio не выполняется?

Спасибо за вашу помощь.

Кроме того, при построении появляется следующий журнал:

Когда я создаю (Build- > Build solution.), этот журнал появляется:

1>------ Build started: Project: print_digits, Configuration: Debug Win32 ------
1>Build started 12/23/2011 4:32:17 PM.
1>InitializeBuildStatus:
1>  Creating "Debugprint_digits.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>FinalizeBuildStatus:
1>  Deleting file "Debugprint_digits.unsuccessfulbuild".
1>  Touching "Debugprint_digits.lastbuildstate".
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:00.08

Он говорит, что сборка выполнена успешно, но по какой-то причине никакой исполняемый файл не создается.

Я пытаюсь запустить простое консольное приложение HelloWorld C# .NET Core и получаю эту ошибку. Поскольку я был довольно новым, я не мог решить эту проблему, попробовав определенные вещи, упомянутые в другом ответе. Пожалуйста, помогите мне решить эту проблему.

Я получаю следующую ошибку:

Исполняемый файл отладки [PATH], указанный в профиле отладки [Project Name], не существует.

Спасибо!

2020-04-10 15:42

18
ответов

Решение

Я пробовал несколько решений в течение многих дней, но единственное, что у меня сработало, — это полное удаление VS 2019 и повторная установка.

2020-07-01 20:47

Для меня все, что мне нужно было сделать, это изменить свойства проекта (щелкните проект правой кнопкой мыши в обозревателе решений -> Свойства проекта), затем на вкладке «Приложение» выберите соответствующую целевую платформу. По умолчанию он был отключен для меня.

2020-09-16 19:35

Скопируйте папку «cli» и переименуйте ее в «cli_x64». У меня это работает.



21 сен ’21 в 19:24
2021-09-21 19:24

2021-09-21 19:24

Совсем недавно у меня возникла эта проблема со свежей установкой Visual Studio 2022. Ошибка произошла, когда я попытался запустить проект с указанным DotNet Framework 5.0 вместо значения по умолчанию, которое было 6.0. Я исправил проблему, изменив свою установку с помощью установщика и вручную выбрав для установки DotNet 5.0 Framework, потому что, по-видимому, он не установлен по умолчанию, а установлен только 6.0. Сообщение об ошибке ни в малейшей степени не помогло мне сказать, что я должен был сделать. Но после этого все работает без ошибок.

2021-10-29 22:18

Решение для функций Azure

  1. Убедитесь, что вы установили.
  2. Откройте свойства вашего проекта,
    right-click project root | properties | Debug Вы должны увидеть это:
  3. Установить
    Launch к
  4. Установить
    Executable на путь твоего
    azure-functions-core-tools исполняемый файл — в
    AppDataRoamingnpmnode_modulesazure-functions-core-toolsbinfunc.exe

2021-06-10 13:39

Как и другие здесь (я проголосовал за пару других ответов), я пробовал несколько вещей в течение многих дней, но безуспешно. В моем случае простое удаление и переустановка VS2019 не решило проблему. Для меня проблема началась с обновлением VS2019 16.9.3, когда внезапно проекты, которые были построены нормально, прежде не сообщали об ошибках компиляции. Причудливые ошибки заключались в невозможности найти ссылки, которые явно там были. У меня есть большое решение с примерно 60 проектами, из которых 40 были .NET Framework 4.5.2, а 20 — .NET Core, смесь 2.x, 3.x и несколько 5.x. Сначала ошибки компиляции затронули как приложения .NET Framework, так и приложения .NET Core. У меня не было этой проблемы ни на моем домашнем компьютере, ни у моих коллег.

Во-первых, я обновил все приложения .NET Framework в своем решении с Framework 4.5.2 до 4.7.2. Похоже, это решило проблему для приложений .NET Framework. Однако в приложениях .NET Core по-прежнему были нелепые ошибки сборки: «Система» не найдена, «NUnit» не найден после создания нового тестового проекта с использованием шаблона NUnit3 VS.

Я попытался отследить потенциальные проблемы конфигурации NuGet; Я попытался сократить инструкцию Win10 PATH, но ничего не помогло. Затем, после того, как первое удаление / переустановка VS2019 не помогло, вот что я сделал, что привело к успешному результату:

  • Удалены все пакеты NuGet с компьютера с помощью консоли диспетчера пакетов, см. Инструкции здесь: https://docs.microsoft.com/en-us/nuget/consume-packages/managing-the-global-packages-and-cache-folders
    Я использовал команду: «dotnet nuget locals all -clear»

  • VS2019 был удален с помощью приложения «Microsoft Visual Studio Installer».

  • VS2017 был удален с помощью приложения «Microsoft Visual Studio Installer».

  • Примечание: НЕ удаляйте приложение «Microsoft Visual Studio Installer»!

  • Удалил все другие предыдущие версии VS (у меня было немного грязи с 2010 и даже 2008), используя приложения и функции

  • Запустите инструмент VS «InstallCleanup.exe», описанный здесь:https://docs.microsoft.com/en-us/visualstudio/install/remove-visual-studio?view=vs-2019

  • Удалено приложение «Установщик Microsoft Visual Studio» с использованием приложений и функций.

  • Удалите все .NET SDK и API, используя параметр —all с .NET Uninstall Tool, см. Https://docs.microsoft.com/en-us/dotnet/core/additional-tools/uninstall-tool ? и https://devblogs.microsoft.com/dotnet/announcing-the-net-core-uninstall-tool-1-0/tabs=macos

  • Удалены все и все оставшиеся элементы, связанные с VS, отображаемые в приложениях и функциях, в том числе некоторые очень старые SDK и наборы инструментов, которые каким-то образом находились на ПК «клона разработчика», проблемы моей компании

  • Скачал и (пере) установил инструмент VS Installer

  • Используя инструмент VS Installer, переустановил VS 2019

  • Переустановил расширения VS, которые я использую (я записал свой список установленных расширений VS на снимках экрана, прежде чем начать все это)

  • Перезагрузился еще раз …

После всего этого исчезли все проблемы, которые не работали, все ошибки типа «Вам не хватает директивы using или ссылки на сборку»! Естественно, необходимые шаги будут отличаться в зависимости от вашего компьютера, и некоторые из шагов, которые я сделал, могли не быть действительно необходимыми. После нескольких дней безрезультатных действий, когда проблема не решалась, пришло время пойти ва-банк. Какое облегчение, что Visual Studio снова «просто работает»!

2021-04-08 05:34

Итак …. Я использую Visual Studio 2019 (версия 16.10.2) в Windows 10. Что исправило проблему для меня:

  1. Начать новый проект
  2. В меню под названием «Настроить новый проект» я снял отметку с опции «разместить решение и проект в одном каталоге», затем нажмите «Далее».
  3. В меню под названием «Дополнительная информация» я выбрал текущую целевую платформу, которая была «.Net5.0 (Current)», затем щелкнула «Создать».

Бамн !!! Фиксированный

2021-06-28 15:16

Решение для VS2022

Откройте свойства проекта, перейдите в раздел «Отладка» и измените значения.

2022-11-08 16:01

Чтобы решить вашу проблему, вам необходимо запустить VS2019 от имени администратора, и при этом сборка проекта будет работать нормально.

введите описание изображения здесь

Примечание: в моем случае vs2019 является профессиональным.

2020-08-03 17:35

Я исправил это, щелкнув проект правой кнопкой мыши, затем «выгрузить проект», затем снова щелкнув правой кнопкой мыши и затем «перезагрузить проект». Затем снова запустите проект, и ошибка должна исчезнуть, по крайней мере, для меня

2021-05-23 20:28

Привет, у меня возникла проблема, вы можете решить эту проблему, откройте проект свойств -> Отладка -> откройте профили запуска отладки ui -> измените рабочий каталог, установите текущую папку отладки

2022-09-28 08:21

Простой ответ: установите кроссплатформенную разработку .NET Core из установщика Visual Studio на вкладке «Рабочие нагрузки». Полностью работает и протестирован здесь :)



16 апр ’21 в 14:40
2021-04-16 14:40

2021-04-16 14:40

Для меня проблемой был неправильный путь в имени проекта.csproj.user. Это сводит меня с ума! После удаления этого файла и пересборки проекта он наконец заработал.

2021-02-19 04:22

Я изменил название своего решения, возникает эта ошибка. Потом я все поменял
using packagenameчтобы исправить один, а затем перестроить. Работает корректно.

2021-05-24 18:43

  1. Проверьте выходной путь проекта (Project> щелкните правой кнопкой мыши Properties> Build> Output path)
  2. Перейдите в меню «Сборка»> «Диспетчер конфигурации». Убедитесь, что в myMLApp установлен флажок «Сборка».
  3. Чистый раствор. Постройте решение.

источникссылка на

2021-05-26 15:36

Причина, по которой вы получаете эту ошибку, заключается в том, что у вас нет исполняемого файла в папке netcoreapp. Попробуйте создать новый проект под названием HelloWorld1, и если vs19 не создает файлы, вам нужно будет удалить и переустановить приложение.

2020-06-16 04:57

У меня был дубликат файла .AssemblyInfo.cs в моем проекте (один в папке bin, а другой снаружи). Этот файл создается автоматически, поэтому я удалил оба файла, очистил проект, выполнил восстановление, а затем перестроил. Исправлена ​​моя проблема.



23 фев ’21 в 17:19
2021-02-23 17:19

2021-02-23 17:19

Для меня это было просто, что я случайно попытался открыть проект, созданный в VS 2022, с помощью Visual Studio 2017.

2022-08-10 06:41

When I try to build my solution, I get the following error:

Visual Studio cannot start debugging because the debug target ‘c:target’ is missing. Please >build the project and retry, or set the OutputPath and AssemblyName properties appropriately >to point at the correct location for the target assembly.

My output path is set correctly to binDebug, but the exe is never created in that folder. Instead, all I get are the exe.config, vshost.exe, and vshost.exe.config files.

Any idea what’s going on?

Majid's user avatar

Majid

13.8k15 gold badges77 silver badges113 bronze badges

asked Aug 18, 2010 at 20:22

sooprise's user avatar

2

  1. Make sure that output path of project is correct (Project > Properties > Build > Output path)

  2. Go in menu to Build > Configuration Manager, and check if your main/entry project has checked Build. If not, check it.

  3. Go to properties > Application , and select the output type of your project

Ali Khalid's user avatar

answered Mar 2, 2012 at 20:42

CZFox's user avatar

CZFoxCZFox

8,9454 gold badges25 silver badges12 bronze badges

5

I’ve had the same problem;

Here are solutions that didn’t work for me:

  • Building/rebuilding entire solution
  • Making sure the output path was correct (MyProject > Properties > Build > Output > Output path)

Here’s the solution that did work for me:

  • Rebuilding just the project

answered Oct 4, 2011 at 9:07

Yehuda Shapira's user avatar

Yehuda ShapiraYehuda Shapira

8,3305 gold badges44 silver badges66 bronze badges

2

You could open the project file with a text editor and replace ‘c:target’ by ‘binDebug’

EDIT

There are other more helpful answers but I can’t delete mine since it’s the accepted one.

@CZFox Answer

@Yehuda Shapira Answer

steps for changing target path is

  1. Go to Properties
  2. Then go to Debug
  3. Browse the Start external program and select the bin/Debug/.exe file

Heretic Monkey's user avatar

answered Aug 18, 2010 at 20:32

Claudio Redi's user avatar

Claudio RediClaudio Redi

67.2k15 gold badges130 silver badges155 bronze badges

1

I have solve this type of problem follow this step

1.VS2010 right click on the solution explorer and select the Build.

  1. Again press Ctrl+F5 or F5

answered Dec 13, 2012 at 19:59

Nirbhay Singh's user avatar

You can try the following steps to resolve the problem.

Step 1:

Right click on the solution and select the property

Step 2:

In Configureation property select the Build option button

answered Oct 9, 2013 at 5:11

ptsivakumar's user avatar

ptsivakumarptsivakumar

4376 silver badges4 bronze badges

1

I just stumbled across this problem, but I’m using Visual Web Developer Express 2010 and couldn’t find any wrong path either within IDE or in the project file. Rebuilding or deleting build folders didn’t help.

But after examining the projects .user file, which I’ve never done before, I discovered that the bad path was in there. Very simple if one knows where to look.

answered Feb 14, 2011 at 23:34

Fredrik Norlin's user avatar

1

I had the same problem and the real solution was embarrassingly easy:

If, in your project, Visual Studio has never successfully compiled the program (before finding the first bug), you will get this error. What I did was remove all offending code (in my case, leaving just a simple button1_Click with no code). Run/Compile the code one time; exit the running program, and this message goes away.

The Compiler builds various directories and files on a first successful compile and these are used by the debugger. I am now recommending with all new projects, define the form, compile, close, and then begin coding.

answered Jul 8, 2013 at 9:00

Mohsin Akhtar's user avatar

I’ve found that this can happen if all the files are deleted from the bin folder. ReBuild the app to force a full build: right click on the project in solution explorer and select ReBuild.

answered Nov 20, 2010 at 19:01

Phileas Fogg's user avatar

Please follow the below steps to overcome this problem:

  1. If you are working with VS2010, change platform target to x64
  2. Select .net framework as 3.5
  3. If you are using any custom code for Sharepoint and like to debug or deploy the use the above….and my bad sake i dont abt the .net applications

Marijn's user avatar

Marijn

10.3k5 gold badges59 silver badges80 bronze badges

answered May 25, 2012 at 9:29

svpoorna's user avatar

1

I had this error too (in VS2010), and in my case (two projects in one solution, with one being for unit tests) the answer was to go into the solution’s (not the project’s) properties and set a single startup project. I would’ve thought it also necessary, in that project’s settings, under Application, to specify the «Startup Object», but it’s working for me with or without that.

answered Sep 23, 2013 at 2:15

Jon Coombs's user avatar

Jon CoombsJon Coombs

2,1152 gold badges25 silver badges26 bronze badges

Although this has already been answered, I found that my own solution was none of the above. Admittedly a rookie mistake, within my solution I had multiple projects, and thus when trying to run solution, the wrong project was set as the Startup Project.

So in my own case, not to say others, the solution was to right click the project and select Set as Startup Project

answered Apr 6, 2017 at 8:30

George Grainger's user avatar

I tried everything mentioned in this thread but none worked.
Then, i tried the simplest thing and it worked.
Close visual studio and open it back up again.

answered Aug 15, 2017 at 20:17

Vibol's user avatar

VibolVibol

5851 gold badge7 silver badges24 bronze badges

This was a really annoying error!

I kept trying to start a debug instance but it just wouldn’t make an exe! Though there were errors in my ConnectionString (while trying to make an SQL connection). There were two backslashes that were supposed to be a part of a path and the tutorial I was following told me to ignore it.

Well, turns out that was the error. A backslash marks the beginning of some escaping that you want to do, and the way to have a backslash displayed is \ instead of .

Got rid of that, and it worked for me.

EDIT: It would seem that you have to get rid of the tiny errors that you have made while writing your code to let it compile properly.

answered Jun 27, 2012 at 9:52

Moriarty Snarly's user avatar

I have solved this problem by changing the Platform Target to «any CPU».

answered Apr 23, 2013 at 8:37

Ketobomb's user avatar

KetobombKetobomb

2,0781 gold badge17 silver badges26 bronze badges

If the above explanation does not help you, then you could have error in the program. I have the same issue and I solved it as I cut the functions used in the same class and one of the functions were the cause of it.

Robert Longson's user avatar

answered Jun 28, 2013 at 11:44

Sezgin's user avatar

I had a very very similar problem, but almost non of the solutions worked for me, finally when i reset the VS setting, it fixed…
To reset settings:

  • Tools Menu >
  • Import and Export Settings >
  • Select Reset all settings radio >
  • Next >
  • Next (You can backup your current settings in this step) >
  • Finish

answered Apr 2, 2014 at 8:23

epsi1on's user avatar

epsi1onepsi1on

5615 silver badges16 bronze badges

Problem:
The problem was I had bad nuget source configuration, so the solution could not start properly despite the fact it was build correctly because it still saw old dll references.

Solution:
It was not enough to change nugget source url, I just had to remove entire nugget source and add it again with proper url.
Clean solution and rebuild it.

answered Aug 9, 2017 at 10:59

Marcin Własny's user avatar

There are many issues that can lead to this problem, after losing 2 days to this issue I think I have the root cause of this issue and also the problem of the Form Designer throwing an error when switching to the Design view (also seems to effect the DataSet Designer):

A language syntax error that Intellisense doesn’t catch.

Once I went through my code with a fine tooth comb I found a couple of really boneheaded mistakes that I kept overlooking, once those were resolved the solution compiled just fine and the output was in the correct place.

Bob Horn's user avatar

Bob Horn

33.2k34 gold badges112 silver badges218 bronze badges

answered Apr 30, 2012 at 17:42

Kingsolmn's user avatar

KingsolmnKingsolmn

1,8682 gold badges23 silver badges39 bronze badges

Here is the solution for this problem, no need to change anything for this problem.
You all know C# is case sensitive language and we have to write all methods and statements in correct case.
We all are just missing this thing and we just have to change method ‘main() —> Main()
This thing solved my problem please let me know if you still find any :-)

answered Oct 11, 2011 at 6:15

user857646's user avatar

0

76 / 36 / 17

Регистрация: 24.07.2014

Сообщений: 357

1

Исполняемый файл для отладки, указанный в профиле отладки, не существует

26.05.2020, 17:06. Показов 17718. Ответов 1


Студворк — интернет-сервис помощи студентам

После того как удалил папку с частью ненужных исходных кодов, вылезла эта ошибка. Восстановление файлов ситуации уже не меняет. Что делать?

Исполняемый файл для отладки, указанный в профиле отладки, не существует



0



Администратор

Эксперт .NET

15621 / 12590 / 4990

Регистрация: 17.03.2014

Сообщений: 25,584

Записей в блоге: 1

27.05.2020, 01:10

2

Справлюсь, в окне Вывод видно что проект откомпилировался с ошибками. Открой окно «Список ошибок» и исправь их.



1



IT_Exp

Эксперт

87844 / 49110 / 22898

Регистрация: 17.06.2006

Сообщений: 92,604

27.05.2020, 01:10

Помогаю со студенческими работами здесь

Инструменты для отладки
Подскажите, есть ли такой инструмент для php, который показывает построчно выполнение кода php,…

Компиляция для отладки
Когда я выполняю отладку, функции, экспортируемые из kernel32.dll имеют свои имена, которые четко…

Использование Firebug для отладки
Подскажите пожалуйста как им пользоваться для отладки javascript кода. Нажимаю на вкладку сценарий…

Что лучше для отладки?
Имеется VS2013 Express, FAR,WinDbg,Hiew,MAsm? Пробовал отлаживать но стоит WIn7 x64? Написал…

Планшет не видится для отладки
Добрый день.
Есть планшет DNS e73, который при рождении, видимо, был hyndai a7hd. На нем…

вывод значений для отладки
Имеется процедура SQL, в которой есть несколько Select&quot;ов, расчеты. Эта процедура вызывается из…

Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:

2

Понравилась статья? Поделить с друзьями:
  • Ошибка исполнительного устройства с2000 сп4 220
  • Ошибка исполнения функции на федресурсе
  • Ошибка исполнения функции 0x8007065в
  • Ошибка исполнения функции 0x8007065b налог ру
  • Ошибка исполнения функции 0x8007065b как исправить