Visual studio ошибка не удается запустить программу

While using Visual Studio in Windows 11/10, if you get Unable to start programThe system cannot find the file specified error; try solutions to get rid of the issue. There could be several reasons why this error might occur on your computer. This article explains some of the common causes along with solutions to troubleshoot the issue within moments.

Visual Studio, Unable to start program, The system cannot find the file specified

To fix Unable to start program, The system cannot find the file specified error in Visual Studio, follow these steps:

  1. Restart Visual Studio
  2. Verify the project file
  3. Run as administrator
  4. Add exclusion in antivirus
  5. Reset Visual Studio

To know more about these steps, keep reading.

1] Restart Visual Studio

At times, it could be a glitch or bug which is causing such an issue on your computer. In most cases, such problems get resolved when you restart the computer. However, in this situation, you need to restart the Visual Studio application. Whether you have an open project or not, you can easily restart this program on your computer. If you have an opened project on your screen, you can save everything and then do as said. Once done, you might be able to use all the options as usual.

If it doesn’t do anything positive, you can follow the subsequent tips and tricks.

2] Verify the project file

Let’s assume that you have deleted the project file from the respective directory after opening it in Visual Studio. It may have happened by mistake. If so, there is a very high chance of getting such an error on your computer. That is why it is highly recommended to verify if the project files are intact or not.

If yes, you can follow the other solutions. However, if there is some issue, you need to rectify it first. In some cases, you might need to recover the deleted project files in order to troubleshoot the aforementioned issue.

3] Run as administrator

Visual Studio, Unable to start program, The system cannot find the file specified

There could be times when you might need to run the Visual Studio with administrator privileges in order to compile a program or debug it. In general, administrator permission may not be required. However, if the aforementioned error appears, it is better to run the program with administrator permission.

To run Visual Studio as an administrator, follow these steps:

  • Click on the Start Menu.
  • Search for visual studio.
  • Right-click on the corresponding search result.
  • Click the Run as administrator option.
  • Click on the Yes button in the UAC prompt.

Following that, check if it resolves your issue or not.

4] Add exclusion in antivirus

If the project file is flagged by the antivirus, it may have been quarantined already. If so, you cannot use those files even though they are opened on Visual Studio. That is why it is recommended to check if your project files have been flagged by your antivirus or not. If yes, you need to add an exclusion for those files in your antivirus app. If you use Windows Security, you can follow this guide to add a folder to the exclusions list.

Related: Visual Studio, Unable to start program, Access is denied

5] Reset Visual Studio

Visual Studio, Unable to start program, Access is denied

If you have changed a lot of things incorrectly, this error could appear on your computer. That is why follow these steps to reset Visual Studio in Windows 11/10:

  • Click on the Tools menu.
  • Select the Import and Export Settings.
  • Choose the Reset all settings option.
  • Click the Next button.
  • Choose the No, just reset settings, overwriting my current settings option.
  • Click the Next button.
  • Click the Finish button.

Then, check if it has solved your issue or not.

Read: Visual Studio Installer is stuck on Downloading

How do you fix The system cannot find the file specified?

To fix The system cannot find the file specified error in Visual Studio, you can follow the aforementioned solutions. It appears mainly because of the antivirus blocking your project file. However, at times, it could appear due to the lack of administrator credentials as well.

Read: Visual Studio, Unable to start program, Access is denied

What does The system cannot find the file specified mean?

The system cannot find the file specified error implies that Visual Studio could not recognize the project file or the executable file in the predefined directory. It may appear due to corrupt project files, antivirus, firewall, etc. If you see this issue on your computer, you can follow these solutions to troubleshoot it within moments.

That’s all! Hope this guide helped.

Read: Fix error 0x80070666 when installing Microsoft Visual C++.

I have a solution in C:full path hereVS2010blender.sln

This solution contains many projects(around 100). When I compile them, they all work fine. I can run them without any problem, and (quite) everything works (there are some bugs).
One of the projects is ALL_BUILD, but it gives the same error if I try to debug INSTALL(another project). I’m compiling with RELWithDebInfo as configuration, and if I execute the program manually it works. It is outputted in C:full path hereVS2010binRelWithDebInfo

But if I try to run the compiler, it says

«Unable to start program
C:full path hereVS2010RelWithDebInfoALL_BUILD
Specified file cannot be found»

I tried to copy the compiled program into the path required by VS, but it raised the same error.

What should I do to solve this? Right now I set up cmake to generate also a mingw project and I compile it and debug it with gdb, but this is a really a slow and impractical workflow, and I would like to use the VS debugger.

I must say that if I compile with Debug as configuration, the program doesn’t even start.

I’m using VS2010 Express on Win7 64bit

(This is a big open source program, so I don’t know exactly whatever it does)

I have a solution in C:full path hereVS2010blender.sln

This solution contains many projects(around 100). When I compile them, they all work fine. I can run them without any problem, and (quite) everything works (there are some bugs).
One of the projects is ALL_BUILD, but it gives the same error if I try to debug INSTALL(another project). I’m compiling with RELWithDebInfo as configuration, and if I execute the program manually it works. It is outputted in C:full path hereVS2010binRelWithDebInfo

But if I try to run the compiler, it says

«Unable to start program
C:full path hereVS2010RelWithDebInfoALL_BUILD
Specified file cannot be found»

I tried to copy the compiled program into the path required by VS, but it raised the same error.

What should I do to solve this? Right now I set up cmake to generate also a mingw project and I compile it and debug it with gdb, but this is a really a slow and impractical workflow, and I would like to use the VS debugger.

I must say that if I compile with Debug as configuration, the program doesn’t even start.

I’m using VS2010 Express on Win7 64bit

(This is a big open source program, so I don’t know exactly whatever it does)

При отладке программы, если вы получаете Невозможно запустить программу, Доступ запрещен ошибка, вот как вы можете избавиться от проблемы. Эта ошибка может возникать в Visual Studio 2019, а также Visual Studio 2022. Если вы получите эту проблему на Windows 11, Windows 10, или любые другие более старые версии, вы можете воспользоваться этими решениями для устранения проблемы.

Visual Studio, не удается запустить программу, доступ запрещен

Чтобы исправить ошибку «Невозможно запустить программу, доступ запрещен» в Visual Studio, выполните следующие действия:

  1. Проверьте с учетной записью администратора
  2. Выберите правильный файл для компиляции
  3. Запустить установщик с другого диска
  4. Отключить сторонний брандмауэр и антивирус
  5. Сбросить Visual Studio

Чтобы узнать больше об этих шагах, продолжайте читать.

1] Проверьте с учетной записью администратора

Иногда вам может понадобиться использовать учетную запись администратора для запуска проекта в Visual Studio в Windows 11 или Windows 10 ПК. Независимо от того, какой язык вы использовали, вам нужно выбрать учетную запись администратора, чтобы избавиться от этой проблемы. Если вы сейчас используете стандартную учетную запись, вам необходимо выйти из этой учетной записи и начать использовать учетную запись администратора.

Существует два основных способа создания учетной записи администратора в Windows 11/10 шт. Вы можете включить скрытую учетную запись администратора or создать локальную учетную запись администратора. Вы можете следовать любому методу, чтобы выполнить работу. Вслед за этим вам необходимо войдите как администратор для устранения проблемы.

2] Выберите правильный файл для компиляции

В большинстве случаев пользователи забывают выбрать правильный файл проекта для компиляции. В результате они сталкиваются с такой проблемой при отладке в Visual Studio. Если вы работали над одним проектом раньше, а потом переключились на другой, это может быть распространенной ошибкой. Вот почему настоятельно рекомендуется проверить правильный файл проекта перед повторной попыткой.

3] Запустите установщик с другого диска

Если вы установили Visual Studio на другом диске, отличном от системного или диска C, вам нужно запустить программу установки только с этого диска. Время от времени ваш компьютер может не делать все, когда вы устанавливаете программу на другой диск. Хотя это не должно быть проблемой, поскольку Windows может запускать программы с любого диска, Visual Studio может вызвать у вас проблемы по этой причине. Вот почему вы можете следовать этому пошаговому руководству, чтобы переместить установленные программы на другой диск без потери данных in Windows 11 / 10.

4] Отключите сторонний брандмауэр и антивирус

Windows Безопасность не создает проблем с Visual Studio, поскольку они очень совместимы друг с другом. Однако, если вы используете сторонний брандмауэр или антивирусную программу на своем компьютере, вы можете столкнуться с этой проблемой. Вот почему рекомендуется временно отключить брандмауэр и антивирусную программу, чтобы проверить, решает ли это проблему или нет.

Если да, вы можете попробовать сбросить эти программы и проверить еще раз. Если это не решит проблему, вам нужно избавиться от этих приложений, чтобы использовать Visual Studio без каких-либо ошибок.

Похожие страницы:: Visual Studio, Невозможно запустить программу, Системе не удается найти указанный файл

5] Сбросить Visual Studio

Чтобы сбросить Visual Studio в Windows 11/10 выполните следующие действия:

  • Откройте Visual Studio на своем компьютере.
  • Нажмите на Инструменты меню.
  • Выберите Импорт и экспорт Вариант настроек.
  • Выберите Сбросить все настройки опцию.
  • Нажмите Далее кнопку.
  • Выберите Да, сохранить мои текущие настройки возможность сохранить текущую настройку.
  • Выберите Нет, просто сбросить настройки возможность сбросить все.
  • Нажмите Далее кнопку.
  • Нажмите на Завершить кнопку.

После этого проверьте, есть ли проблема или нет.

Читайте: Установщик Visual Studio зависает при загрузке

Как исправить отказ в доступе в Visual Studio?

Для того, чтобы исправить Доступ запрещен ошибка в Visual Studio, вам необходимо воспользоваться вышеупомянутыми решениями. Во-первых, проверьте, есть ли у вас учетная запись администратора или нет. После этого не забудьте проверить настройки брандмауэра и антивируса. С другой стороны, вам может потребоваться восстановить настройки в Windows Реестр, чтобы избавиться от этой проблемы.

Как запустить Visual Studio от имени администратора?

Чтобы запустить Visual Studio от имени администратора в Windows 11 или Windows 10, вы можете использовать меню «Пуск». Тем не менее, нажмите на меню «Пуск» и найдите визуальная студия. Увидев результат поиска, убедитесь, что выбрана Visual Studio. Если это так, нажмите на Запуск от имени администратора и нажмите Да в командной строке UAC.

Оригинал статьи

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

  • Только начал обучение С++ по учебнику Страуструпа.
    Загрузил Visual Studio

    Начал со стандартного «Hello, World!» 

    Отладка проходит успешно, ошибок нет.

    Однако программа не запускается. 

    Выходят следующие сообщения:

    Следующий проект устарел: Hello, World — Debug Win32

    Не удается запустить программу: …/HelloWorld.exe
    Не удается найти указанный файл

    Что я делаю не так?

    Система: Wind x64.

Ответы

  • Книга нашего дорогого и горячо любимого Страуструпа написана о языке программирования, а не о работе в среде разработки Visual Studio. Последнее описано в справочной системе (в крайнем случае, есть сайт msdn.microsoft.com/library).
    Советую там ознакомиться с технологией создания проекта VC++ и процедурой преобразования исходного кода в исполняемый модуль.

    • Изменено

      20 ноября 2013 г. 5:37

    • Помечено в качестве ответа
      Maksim MarinovMicrosoft contingent staff, Moderator
      2 декабря 2013 г. 7:42

While using Visual Studio in Windows 11/10, if you get Unable to start programThe system cannot find the file specified error; try solutions to get rid of the issue. There could be several reasons why this error might occur on your computer. This article explains some of the common causes along with solutions to troubleshoot the issue within moments.

Visual Studio, Unable to start program, The system cannot find the file specified

To fix Unable to start program, The system cannot find the file specified error in Visual Studio, follow these steps:

  1. Restart Visual Studio
  2. Verify the project file
  3. Run as administrator
  4. Add exclusion in antivirus
  5. Reset Visual Studio

To know more about these steps, keep reading.

1] Restart Visual Studio

At times, it could be a glitch or bug which is causing such an issue on your computer. In most cases, such problems get resolved when you restart the computer. However, in this situation, you need to restart the Visual Studio application. Whether you have an open project or not, you can easily restart this program on your computer. If you have an opened project on your screen, you can save everything and then do as said. Once done, you might be able to use all the options as usual.

If it doesn’t do anything positive, you can follow the subsequent tips and tricks.

2] Verify the project file

Let’s assume that you have deleted the project file from the respective directory after opening it in Visual Studio. It may have happened by mistake. If so, there is a very high chance of getting such an error on your computer. That is why it is highly recommended to verify if the project files are intact or not.

If yes, you can follow the other solutions. However, if there is some issue, you need to rectify it first. In some cases, you might need to recover the deleted project files in order to troubleshoot the aforementioned issue.

3] Run as administrator

Visual Studio, Unable to start program, The system cannot find the file specified

There could be times when you might need to run the Visual Studio with administrator privileges in order to compile a program or debug it. In general, administrator permission may not be required. However, if the aforementioned error appears, it is better to run the program with administrator permission.

To run Visual Studio as an administrator, follow these steps:

  • Click on the Start Menu.
  • Search for visual studio.
  • Right-click on the corresponding search result.
  • Click the Run as administrator option.
  • Click on the Yes button in the UAC prompt.

Following that, check if it resolves your issue or not.

4] Add exclusion in antivirus

If the project file is flagged by the antivirus, it may have been quarantined already. If so, you cannot use those files even though they are opened on Visual Studio. That is why it is recommended to check if your project files have been flagged by your antivirus or not. If yes, you need to add an exclusion for those files in your antivirus app. If you use Windows Security, you can follow this guide to add a folder to the exclusions list.

Related: Visual Studio, Unable to start program, Access is denied

5] Reset Visual Studio

Visual Studio, Unable to start program, Access is denied

If you have changed a lot of things incorrectly, this error could appear on your computer. That is why follow these steps to reset Visual Studio in Windows 11/10:

  • Click on the Tools menu.
  • Select the Import and Export Settings.
  • Choose the Reset all settings option.
  • Click the Next button.
  • Choose the No, just reset settings, overwriting my current settings option.
  • Click the Next button.
  • Click the Finish button.

Then, check if it has solved your issue or not.

Read: Visual Studio Installer is stuck on Downloading

How do you fix The system cannot find the file specified?

To fix The system cannot find the file specified error in Visual Studio, you can follow the aforementioned solutions. It appears mainly because of the antivirus blocking your project file. However, at times, it could appear due to the lack of administrator credentials as well.

Read: Visual Studio, Unable to start program, Access is denied

What does The system cannot find the file specified mean?

The system cannot find the file specified error implies that Visual Studio could not recognize the project file or the executable file in the predefined directory. It may appear due to corrupt project files, antivirus, firewall, etc. If you see this issue on your computer, you can follow these solutions to troubleshoot it within moments.

That’s all! Hope this guide helped.

Read: Fix error 0x80070666 when installing Microsoft Visual C++.

Создаю проект: File > New > Project… > Empty Project

Создаю файл: File > New > File.. > C++ File

Пишу стандартную программу «Hello, world!»

#include <iostream>
#include <cstdlib>

using namespace std;

int main()
{
     cout << "Hello, world!" << endl;
     system("pause");
     return 0;
}

Жму ctrl+f5. Идёт построение, ошибок в коде нет, но выскакивает ошибка «не удаётся запустить программу «путь до exe файла» Не удаётся найти указанный файл.

Скриншот

Самого exe файла по этому пути нет, он даже не создаётся.

Буду признателен за вашу помощь.

PAMAC

0 / 0 / 0

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

Сообщений: 12

1

Не удаётся запустить программу после отладки

11.06.2010, 00:39. Показов 34511. Ответов 10

Метки нет (Все метки)


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

Добрый день!

Пытаюсь выполнить следующий код:

C++
1
2
3
4
5
6
#include <iostream.h>
 
void main()
{
    cout << "1 n";
}

Нажимаю F7
После жму F5

Далее появляется ошибка следующего содержания:
Не удаётся запустить программу «путь к exe»
Не удаётся найти указанный файл.

exe не создаётся. Пользуюсь Microsoft Visual Studio 2008

Что делать?

0

M128K145

Эксперт JavaЭксперт С++

8381 / 3613 / 419

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

Сообщений: 10,708

11.06.2010, 01:32

2

Написать код без ошибок

C++
1
2
3
4
5
6
7
#include <iostream>
 
int main()
{
    std::cout << "1 n";
    return 0;
}

0

0 / 0 / 0

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

Сообщений: 12

11.06.2010, 10:39

 [ТС]

3

Исправил. Всё-равно таже самая ошибка появляется….

0

Эксперт JavaЭксперт С++

8381 / 3613 / 419

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

Сообщений: 10,708

11.06.2010, 19:17

4

PAMAC, прикрепите проект в архиве к сообщению

0

0 / 0 / 0

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

Сообщений: 12

12.06.2010, 11:43

 [ТС]

5

вот..

0

M128K145

Эксперт JavaЭксперт С++

8381 / 3613 / 419

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

Сообщений: 10,708

12.06.2010, 12:44

6

Лучший ответ Сообщение было отмечено tezaurismosis как решение

Решение

PAMAC, сделайте ребилд проекта(в меню Build) и в проверка.cpp напишите первой строкой

C++
1
#include "stdafx.h"

И на будущее — не называйте проекты и файлы кириллицей

1

0 / 0 / 0

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

Сообщений: 12

13.06.2010, 01:34

 [ТС]

7

благодарю

0

0 / 0 / 1

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

Сообщений: 29

14.07.2013, 17:05

8

У меня такая же ошибка , помогите пожалуйста

0

banzay89

2 / 2 / 1

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

Сообщений: 129

13.02.2014, 13:41

9

TheCssForever,

Цитата
Сообщение от M128K145
Посмотреть сообщение

PAMAC, сделайте ребилд проекта(в меню Build) и в проверка.cpp напишите первой строкой

C++
1
#include "stdafx.h"

И на будущее — не называйте проекты и файлы кириллицей

0

Asix

0 / 0 / 0

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

Сообщений: 4

23.05.2014, 00:49

10

такая же проблема подскажите в чем может быть беда,1 курснеку мифи:

C++
1
2
3
4
5
6
7
8
9
10
#include<stdio.h>
#include<conio.h>
int main()
{
    printf("hello,worldn");
  
    _getch();
 
return 0;
}

0

2 / 2 / 1

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

Сообщений: 3

26.05.2015, 22:33

11

В проект файлы добавляются командой меню «Проект — Добавить новый элемент…». — мне помогло

0

GavriKos

У вас программа содержит ошибку. В 99 строке. Пока вы ее не поправите — ничего не получится запустить.

И ради бога — поставьте английскую студию! Гуглить в разы проще будет!

Ответ написан

более трёх лет назад


Комментировать


Комментировать

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

  • Недавно столкнулся с проблемой в Visual Studio : при попытке компиляции программы в конфигурации debug программа завершается с ошибкой «Невозможно найти указанный файл <путь>». До очистки решения
    программа работала верно, .cpp файл в проект включен, все зависимости в свойствах проекта выставлены, все необходимые файлы в папку debug перенесены. Проверял, не запускает с той же ошибкой даже программу первого урока kuchka-pc
    (http://kychka-pc.ru/sfml/urok-1-podklyuchenie-biblioteki-k-srede-razrabotki-visual-studio-2013.html). Подскажите, в чём может быть проблема? Прикладываю код программы с kuchka-pc, тк. он короче.

    #include <iostream>
    #include <windows.h>
    #include <SFML/Graphics.hpp>
    
    using namespace sf;
    
    int main()
    {
    	RenderWindow window(VideoMode(1366, 768), "1");
    	while (window.isOpen())
    	{
    		Event event;
    		while (window.pollEvent(event))
    		{
    			if (Keyboard::isKeyPressed(Keyboard::Escape))
    				window.close();
    		}
    		window.clear();
    		window.display();
    	}
    	return 0;
    }

Ответы

  • Единственная возможноя причина, это то что берутся заголовочные файлы из одной версии SDK, а тулсет из другой. Если есть старые ненужные версии студии, снесите их, и переустановите SDK нужной версии студии.

    • Предложено в качестве ответа

      6 марта 2018 г. 7:51

    • Помечено в качестве ответа
      Maksim MarinovMicrosoft contingent staff, Moderator
      29 марта 2018 г. 9:57

2 / 2 / 0

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

Сообщений: 66

1

03.11.2019, 16:25. Показов 18527. Ответов 6


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

microsoft visual studio 2019 с пол года работал, но сейчас при попытки отладки выскакивает ошибка «Не удаётся запустить программу LL.exe .Не удаётся найти указанный файл»
Создание нового проекта не помогает.

В чём может быть причина и как её устранить ? Так же менял места сохранения файлов проекта.

Добавлено через 1 час 1 минуту
Переустановка не помогла

Добавлено через 33 минуты
Если вручную добавить файл в проект то всё работает.
Но вопрос остаётся открытым: Почему он сам не может это сделать как делал ранее ?



0



Эксперт .NET

6433 / 3965 / 1583

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

Сообщений: 9,272

03.11.2019, 16:29

2

Убедитесь что нет ошибок компиляции.



0



2 / 2 / 0

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

Сообщений: 66

03.11.2019, 16:30

 [ТС]

3

Цитата
Сообщение от Someone007
Посмотреть сообщение

Убедитесь что нет ошибок компиляции

Даже при создании нового проекта с Hello World выскакивает эта ошибка.



0



Эксперт С++

3568 / 2823 / 450

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

Сообщений: 5,193

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

05.11.2019, 17:16

4

Цитата
Сообщение от Triglav86
Посмотреть сообщение

Почему он сам не может это сделать как делал ранее ?

я уже говорил, что vs2019 сырое гуамно..
пользуйтесь vs2017 как минимум до весны следующего года, там видно будет.



0



Эксперт .NET

6433 / 3965 / 1583

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

Сообщений: 9,272

06.11.2019, 04:28

5

Цитата
Сообщение от _lunar_
Посмотреть сообщение

я уже говорил, что vs2019 сырое гуамно

Почему-то у меня никаких проблем с VS2019 нет. Тут очень велика вероятность что проблема в прокладке между монитором и креслом.



0



Эксперт С++

3568 / 2823 / 450

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

Сообщений: 5,193

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

06.11.2019, 09:15

6

Цитата
Сообщение от Someone007
Посмотреть сообщение

Тут очень велика вероятность что проблема в прокладке между монитором и креслом.

типа пошутил умник.
если у тебя нет проблем, значит ты не умеешь пользоваться студией — для юзера 0 уровня всё работает хорошо.



1



6578 / 4563 / 1843

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

Сообщений: 13,726

06.11.2019, 10:57

7

Цитата
Сообщение от Triglav86
Посмотреть сообщение

microsoft visual studio 2019 с пол года работал, но сейчас при попытки отладки выскакивает ошибка «Не удаётся запустить программу LL.exe .Не удаётся найти указанный файл»
Создание нового проекта не помогает.

А сам файл-то есть?

Добавлено через 1 минуту
Посмотри, что у тебя прописано в настройках проекта Debugging->Command



0



Понравилась статья? Поделить с друзьями:
  • Vipnet cryptofile ошибка 32801
  • Visual studio ошибка исключение не обработано
  • Visit workshop display faulty w203 ошибка
  • Virtualbox критическая ошибка машины
  • Vision ошибка энкодера