Microsoft visual studio код ошибки 0x80070002

I just installed visual studio, (not new to coding) and I keep getting an error that goes like «error: unable to open file C:user…main.obj Error code = 0x80070002»
an Image of the error
this error shows up whenever there is something wrong with my code like for example if i do:

#include <iostream>

int main()
{
std::cout << "Hello World!n";
}

everything runs normal, but if I make a mistake say:

#include <iostream>

int main()
{
std::cout std::cout << "Hello World!n";
}

I get the error, it’s so annoying I don’t want to get that error every time there is something wrong with my code the error list bar is enough, what do I do ?

asked Mar 26, 2020 at 12:50

Dissoantn Void's user avatar

4

Could you please tell us what version of Visual Studio are you using?

If you are using vs2017 or later, I suggest you could try to use /DEBUG:FULL property in «Linker/Debugging/Generate Debug Info.

enter image description here

I suggest you could refer to the Doc:

When you specify /DEBUG with no additional options, the linker
defaults to /DEBUG:FULL for command line and make file builds, for
release builds in the Visual Studio IDE, and for both debug and
release builds in Visual Studio 2015 and earlier versions. Beginning
in Visual Studio 2017, the build system in the IDE defaults to
/DEBUG:FASTLINK when you specify the /DEBUG option for debug builds.
Other defaults are unchanged to maintain backward compatibility.

answered Mar 27, 2020 at 2:32

Jeaninez - MSFT's user avatar

Jeaninez — MSFTJeaninez — MSFT

3,0501 gold badge4 silver badges20 bronze badges

Rebuild the program in a different disk or reinstall the VS could be the final solution I think.

answered Mar 27, 2020 at 2:37

Chris's user avatar

ChrisChris

2531 silver badge10 bronze badges

RRS feed

  • Remove From My Forums
  • Question

  • I have this problem (The system cannot find the file specified. (Exception from HRESULT: 0x80070002)) when create new project on visual studio 2015

    • Edited by
      Ashraf alngar
      Sunday, March 20, 2016 4:14 PM
    • Moved by
      Angie Xu
      Monday, March 28, 2016 1:28 AM
      this is visual studio issue

All replies

  • Hi Ashraf,

    Welcome on MSDN forum.

    Could you please provide some details, is it related to BizTalk Server?

    This forum is related to Microsoft BizTalk Server related queries. If you issue is not related to BizTalk, please post it on Visual Studio forum to get proper solution.

    https://social.msdn.microsoft.com/Forums/en-US/home?category=visualstudio


    Thanks,

    If my reply is helpful please mark as

    Answer or vote as
    Helpful.

    My blog |
    Twitter | LinkedIn

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Solution: Some users had already faced the same issue and Visual Studio 2015 Express Web and had the same problem. Please try below solutions and see if it worked,

    • Reinstall Nuget for Visual Studio 2015
    • Replace Nuget for Visual Studio 2015 with the former Nuget
    • Run Visual Studio as Administrator
    • Modify/Delete IISExpress applicationhost.config file
    • Reinstall IISExpress

    If all above solution not worked then only thing that you need to Repair-install of Visual Studio:

    • Press Windows + R
    • Enter appwiz.cpl and press Enter
    • Right-click the entry «Microsoft Visual Studio Express 2015 for Web» and click «Repair»

    Note: This is going to reinstall all packages that you have uninstalled, because you weren’t needing them (eg. Microsoft SQL Server Native Client).

    Reference: http://stackoverflow.com/questions/28299341/the-system-can-not-find-the-file-specified-in-visual-studio-exception-from-hres


    Thanks,

    If my reply is helpful please mark as

    Answer or vote as
    Helpful.

    My blog |
    Twitter | LinkedIn

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    • Proposed as answer by
      Weiwei Cai
      Monday, March 28, 2016 9:39 AM

  • Thanks for [Kamlesh Kumar]’s help.

    Hi Ashraf alngar,

    Which version or Visual Studio 2015 are you using? Please install the latest update for VS2015 to check whether it can be fixed. The latest update for VS 2015 current now is Update 1. Please download and install from below link.

    https://www.microsoft.com/en-us/download/details.aspx?id=49989

    Please try [Kamlesh Kumar]’s steps first to check whether it can fix your problem or not. If the problem has been fixed, please mark the helpful reply as answer, which is benefit to other communities who has the same problem.

    If the problem still exist, please use http://aka.ms/vscollect  to gather the VS and .Net Frameowrk installation logs. After using it, you will find vslogs.cab from %temp% folder. Please upload the file
    to Onedrive and share the link here.

    Best Regards,
    Weiwei

RRS feed

  • Remove From My Forums
  • Question

  • I have this problem (The system cannot find the file specified. (Exception from HRESULT: 0x80070002)) when create new project on visual studio 2015

    • Edited by
      Ashraf alngar
      Sunday, March 20, 2016 4:14 PM
    • Moved by
      Angie Xu
      Monday, March 28, 2016 1:28 AM
      this is visual studio issue

All replies

  • Hi Ashraf,

    Welcome on MSDN forum.

    Could you please provide some details, is it related to BizTalk Server?

    This forum is related to Microsoft BizTalk Server related queries. If you issue is not related to BizTalk, please post it on Visual Studio forum to get proper solution.

    https://social.msdn.microsoft.com/Forums/en-US/home?category=visualstudio


    Thanks,

    If my reply is helpful please mark as

    Answer or vote as
    Helpful.

    My blog |
    Twitter | LinkedIn

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Solution: Some users had already faced the same issue and Visual Studio 2015 Express Web and had the same problem. Please try below solutions and see if it worked,

    • Reinstall Nuget for Visual Studio 2015
    • Replace Nuget for Visual Studio 2015 with the former Nuget
    • Run Visual Studio as Administrator
    • Modify/Delete IISExpress applicationhost.config file
    • Reinstall IISExpress

    If all above solution not worked then only thing that you need to Repair-install of Visual Studio:

    • Press Windows + R
    • Enter appwiz.cpl and press Enter
    • Right-click the entry «Microsoft Visual Studio Express 2015 for Web» and click «Repair»

    Note: This is going to reinstall all packages that you have uninstalled, because you weren’t needing them (eg. Microsoft SQL Server Native Client).

    Reference: http://stackoverflow.com/questions/28299341/the-system-can-not-find-the-file-specified-in-visual-studio-exception-from-hres


    Thanks,

    If my reply is helpful please mark as

    Answer or vote as
    Helpful.

    My blog |
    Twitter | LinkedIn

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    • Proposed as answer by
      Weiwei Cai
      Monday, March 28, 2016 9:39 AM

  • Thanks for [Kamlesh Kumar]’s help.

    Hi Ashraf alngar,

    Which version or Visual Studio 2015 are you using? Please install the latest update for VS2015 to check whether it can be fixed. The latest update for VS 2015 current now is Update 1. Please download and install from below link.

    https://www.microsoft.com/en-us/download/details.aspx?id=49989

    Please try [Kamlesh Kumar]’s steps first to check whether it can fix your problem or not. If the problem has been fixed, please mark the helpful reply as answer, which is benefit to other communities who has the same problem.

    If the problem still exist, please use http://aka.ms/vscollect  to gather the VS and .Net Frameowrk installation logs. After using it, you will find vslogs.cab from %temp% folder. Please upload the file
    to Onedrive and share the link here.

    Best Regards,
    Weiwei

Вопрос:

Я пытаюсь создать новый проект в visual studio.it дает некоторую ошибку

пожалуйста, дайте мне несколько предложений….. enter image description here

Я этого не знаю.
Я пытаюсь переустановить, и снова появляется такая же ошибка.

Я пробую эту работу…

Ответ №1

Попробуйте 1 первый, если не другой

  • Перейдите в Extentions and updates, затем найдите Nuget и удалите его,
    перезапустите визуальную студию, снова установите Nuget, затем снова перезапустите.
    вы должны иметь возможность создать свой новый проект.
  • Восстановите свою Visual Studio 2013 или 2015

Ответ №2

Я использую Visual Studio 2015 Express Web и имею ту же проблему. Я много искал для решений, и ни одна из них не работала:

  • Переустановите Nuget для Visual Studio 2015
  • Замените Nuget для Visual Studio 2015 с прежним Nuget
  • Запустить Visual Studio как администратор
  • Изменить/Удалить файл IISExpress applicationhost.config
  • Переустановите IISExpress

Единственное, что разрешило это: Repair-install Visual Studio:

  • Нажмите Windows + R
  • Введите appwiz.cpl и нажмите Enter
  • Щелкните правой кнопкой мыши запись “Microsoft Visual Studio Express 2015 для Интернета” и нажмите “Восстановить”
  • Будьте терпеливы…

Примечание.. Это приведет к переустановке всех удаленных вами пакетов, поскольку вам не нужны они (например, собственный клиент Microsoft SQL Server).

Ответ №3

Перейдите по ссылке: VS2013- > Инструменты- > Расширения и обновления- > Онлайн-поиск для NuGet и установка. Исправлена ​​проблема в 2013 году REL

Ответ №4

Я столкнулся с аналогичной проблемой при создании основного проекта .NET в VS 2015, и он разрешил восстановление .NET Core. Возможная причина: ядро ​​.NET было установлено, связанное с версией сообщества VS, но позже я удалю сообщество VS и переустановил профессиональную версию, но .NET Core не был удален с удалением версии сообщества. После восстановления ядра .NET с панели управления он работает сейчас.

Ответ №5

Вам нужно установить менеджер пакетов Nuget из Tools- > Extensions and Updates → online- > и найти “Nuget package manager” из панели поиска и нажать “Установить”.

Ответ №6

Решение Андрея Свирида:

Изменение установки Visual Studio 2015 и снятие флажка Microsoft Web Developer Tools
Удаление папки C:Program Files (x86)Microsoft Visual Studio 14.0Common7IDEExtensionsMicrosoftWeb ToolsDNX, оставленной из предыдущей версии инструментов.
Удаление% LocalAppData%MicrosoftVisualStudio14.0ComponentModelCache
Удаление% LocalAppData%MicrosoftVisualStudio14.0devenv.exe.config
Выполнение ремонта инструментария предварительного просмотра.

Ответ №7

У вас есть соответствующие компоненты, установленные вместе с Visual Studio?

Я получал эту ошибку при попытке добавить новый проект Axure Mobile Services. Зная, как долго восстанавливается Visual Studio, я надеялся избежать этого.

Для меня исправлено открытие программ и функций и выбор “Изменить” Visual Studio, а не “Ремонт”.

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

Ответ №8

Я столкнулся с той же проблемой, когда пытаюсь создать веб-приложение ASP.NET MVC 4 в VS 2012.

Чтобы устранить эту проблему В VS 2012 нажмите “Инструменты” (меню) → “Расширения и обновления” (пункт меню) → в окне “Расширения и обновления” нажмите “Обновить”.

Установите ожидающие обновления для VS 2012, а также для Nuget.

Перезапустите VS 2012.

Ответ №9

У меня была такая же ошибка с использованием сообщества VS 2017 (и предыдущего) при попытке открыть файл .cs или попытке открыть свойства проекта.
Все это на новой установке VS на новой установке Windows 10…

Я нашел 2 решения:

Запустите VS как admin (что не является хорошим выбором и может препятствовать отладке drag & drop в ваше приложение).

или лучше:

Измените параметры безопасности вашей папки% temp% на “все – полный контроль”.:)

  • Hi KurtChin,

    If this issue happen only when you are creating ASP.NET Web apps, but other projects work fine.

    The ASP.NET templates could be broken, in order to fix this issue, I suggest you to try devenv switch in command prompt, please follow the steps below (I’m using vs2015):

    1. Open Windows Explorer, and navigate to <Visual Studio Installation Path>Common7IDE (by default is <C:Program Files Microsoft Visual Studio 14.0Common7IDE>);
    2. Delete the ItemTemplatesCache, ProjectTemplatesCache folder;
    3. Open Visual Studio Command Prompt (2015): Start menu ->
      All Programs
      -> Microsoft Visual Studio 2015 ->
      Developer
      Command Prompt for VS2015 (run it with Administrator privilege: right-click the program ->
      Run as administrator);
    4. Run the devenv /InstallVSTemplates switch;
    5. Run the devenv /Setup switch

    If this issue also happen when you are creating other projects, please try to manually repair it.

    Please go to control panel, choose vs2015 right click “repair”.

    I also found a similar issue as yours which happened in VS2013, you might refer to it.

    It’s said this error could be caused by your NuGet Package Manager incorrect installation.

    The link is here for you to refer:
    http://stackoverflow.com/questions/18984639/exception-hresult-080070002-while-creating-an-mvc-application

    If this issue still exists after all steps above, please check the ActiveLog.xml.
    This file appears after you’ve called devenv /log in
    Developer
    Command Prompt for VS2015. By default, the log file is:

     %APPDATA%MicrosoftVisualStudioVersionActivityLog.xml

    This file will log all operations when you operate Visual Studio which has some information for troubleshooting. Please try it and share it with us.

    Best regards,

    Fletcher


    MSDN Community Support
    Please remember to click «Mark as Answer» the responses that resolved your issue, and to click «Unmark as Answer» if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to
    MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by

      Wednesday, December 28, 2016 2:58 PM

  • Ну, я написал простой код, чтобы проверить возможность создания объектов с помощью оператора «new». Когда я пытался скомпилировать код, MS Visual Studio выдавала ошибку примерно так: «Ошибка: невозможно открыть файл C: Users … test1 Debug main.obj. Код ошибки = 0x80070002.Error: Could not find ‘C: Users … test1 Debug main.obj’. test1.exe был собран с / DEBUG: FASTLINK, который требует объектные файлы для отладки.

    Что здесь происходит? Пожалуйста помоги.

    Код:

    #include <iostream>
    
    class czlowiek {
    int wiek;
    char plec;
    czlowiek();
    czlowiek(int Wiek, int Plec);
    };
    
    czlowiek::czlowiek(int Wiek, int Plec) {
    wiek = Wiek;
    plec = Plec;
    }
    
    int main()
    {
    czlowiek *first;
    first = new czlowiek();
    delete first;
    std::cin.get();
    return 0;
    }
    

    0

    Решение

    Код, который вы разместили, не будет ссылаться:

    • Конструктор czlowiek() не имеет реализации.
    • Оба конструктора являются закрытыми (в классах члены и методы по умолчанию закрыты).

    В качестве предупреждения вы назначаете int для char (plec).

    1

    Другие решения

    Других решений пока нет …

    i trying to create a new project in visual studio .it give some error

    please give me some suggestions…..enter image description here

    i don’t know this happen.
    i am trying to reinstall and again same error is coming .

    i try this cant work …

    Krisztián Balla's user avatar

    asked Feb 3, 2015 at 12:47

    Sankar's user avatar

    5

    Try 1 first if not other one

    1. Go to Extentions and updates then Search Nuget and uninstall it,
      restart visual studio, again install Nuget then again restart.
      you should be able to create your new project.
    2. Repair your Visual Studio 2013 or 2015

    answered Jul 12, 2016 at 18:01

    Charitha Goonewardena's user avatar

    1

    I am using Visual Studio 2015 Express Web and had the same problem. I searched a lot for solutions and none of these worked:

    • Reinstall Nuget for Visual Studio 2015
    • Replace Nuget for Visual Studio 2015 with the former Nuget
    • Run Visual Studio as Administrator
    • Modify/Delete IISExpress applicationhost.config file
    • Reinstall IISExpress

    The only thing that solved it was a Repair-install of Visual Studio:

    • Press Windows + R
    • Enter appwiz.cpl and press Enter
    • Right-click the entry «Microsoft Visual Studio Express 2015 for Web» and click «Repair»
    • Be patient…

    Note: This is going to reinstall all packages that you have uninstalled, because you weren’t needing them (eg. Microsoft SQL Server Native Client).

    answered Feb 20, 2016 at 10:40

    Krisztián Balla's user avatar

    Krisztián BallaKrisztián Balla

    18.7k13 gold badges66 silver badges82 bronze badges

    1

    Go to: VS2013->Tools->Extensions and Updates->Online Search for NuGet and install. Fixed my problem in 2013 REL

    answered Feb 2, 2016 at 10:05

    Amol's user avatar

    AmolAmol

    1,4312 gold badges17 silver badges32 bronze badges

    1

    I encountered a similar problem when creating a .NET core project in VS 2015, and it’s resolved by repairing .NET Core. The possible reason is, my .NET core was installed associated with VS community version, but later I uninstall VS community and reinstall professional version, but .NET Core was not uninstalled with community version uninstall. After repairing .NET core from control panel, it works now.

    answered Oct 12, 2016 at 8:49

    Kaka's user avatar

    I had the same error using VS community 2017 (and previous), when trying to open a .cs file, or trying to open project properties.
    All that on a fresh VS install on a fresh Windows 10 install…

    I found 2 solutions:

    Start VS as admin (which is not a good choice, and may prevent debugging drag&drop into your app).

    or better:

    Change security settings of your %temp% folder to «everyone — full control». :)

    answered May 3, 2017 at 8:46

    Sylvain's user avatar

    SylvainSylvain

    2732 silver badges11 bronze badges

    You need to install Nuget package manager from Tools-> Extensions and Updates -> online-> and search ‘Nuget package manager’ from search bar and click install.

    answered May 7, 2017 at 15:05

    rubizky's user avatar

    Solution by Andriy Svyryd:

    Modifying Visual Studio 2015 installation and unchecking Microsoft Web Developer Tools
    Deleting C:Program Files (x86)Microsoft Visual Studio 14.0Common7IDEExtensionsMicrosoftWeb ToolsDNX folder that was left from a previous version of the tools.
    Deleting %LocalAppData%MicrosoftVisualStudio14.0ComponentModelCache
    Deleting %LocalAppData%MicrosoftVisualStudio14.0devenv.exe.config
    Running repair on the preview2 tooling.

    answered Jan 11, 2017 at 14:01

    Naresh Narasimhalu's user avatar

    Do you have the relevent components installed along with Visual Studio?

    I was getting this error when trying to add a new Axure Mobile Services project. Knowing how long repairing Visual Studio takes, I hoped to avoid that.

    What fixed it for me was opening up Programs and Features, and selecting «Modify» Visual Studio rather than «Repair».

    I’m not sure if there was an error in a previous installation that I didn’t notice, but Web Tools wasn’t selected in the installed components. After selecting that, installing, and restarting my computer, I no longer got the error when trying to add a new project.

    answered Jan 21, 2017 at 21:16

    alaskanloops's user avatar

    I encountered the same problem when I try to create ASP.NET MVC 4 web application in VS 2012.

    To resolve this issue In VS 2012 click on Tools (menu)>>Extensions and Updates (menu item) >> in the Extensions and Updates window click on Updates menu.

    Install pending updates for VS 2012 and also for Nuget.

    Restart the VS 2012.

    answered Feb 17, 2017 at 6:24

    Byre Gowda's user avatar

    My version of the problem was caused by VS extensions running in the background.
    My solution: disable non-critical extension «Extension» -> «Manage Extensions» -> «Installed» -> disable: «Visual Studio IntelliCode», and also disable other extensions not currently in use.
    -> restart VS

    answered Feb 23, 2022 at 10:34

    siggi_pop's user avatar

    siggi_popsiggi_pop

    5587 silver badges10 bronze badges

    • Remove From My Forums
    • Question

    • I have this problem (The system cannot find the file specified. (Exception from HRESULT: 0x80070002)) when create new project on visual studio 2015

      • Edited by
        Ashraf alngar
        Sunday, March 20, 2016 4:14 PM
      • Moved by
        Angie Xu
        Monday, March 28, 2016 1:28 AM
        this is visual studio issue

    All replies

    • Hi Ashraf,

      Welcome on MSDN forum.

      Could you please provide some details, is it related to BizTalk Server?

      This forum is related to Microsoft BizTalk Server related queries. If you issue is not related to BizTalk, please post it on Visual Studio forum to get proper solution.

      https://social.msdn.microsoft.com/Forums/en-US/home?category=visualstudio


      Thanks,

      If my reply is helpful please mark as

      Answer or vote as
      Helpful.

      My blog |
      Twitter | LinkedIn

      This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    • Solution: Some users had already faced the same issue and Visual Studio 2015 Express Web and had the same problem. Please try below solutions and see if it worked,

      • Reinstall Nuget for Visual Studio 2015
      • Replace Nuget for Visual Studio 2015 with the former Nuget
      • Run Visual Studio as Administrator
      • Modify/Delete IISExpress applicationhost.config file
      • Reinstall IISExpress

      If all above solution not worked then only thing that you need to Repair-install of Visual Studio:

      • Press Windows + R
      • Enter appwiz.cpl and press Enter
      • Right-click the entry «Microsoft Visual Studio Express 2015 for Web» and click «Repair»

      Note: This is going to reinstall all packages that you have uninstalled, because you weren’t needing them (eg. Microsoft SQL Server Native Client).

      Reference: http://stackoverflow.com/questions/28299341/the-system-can-not-find-the-file-specified-in-visual-studio-exception-from-hres


      Thanks,

      If my reply is helpful please mark as

      Answer or vote as
      Helpful.

      My blog |
      Twitter | LinkedIn

      This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

      • Proposed as answer by
        Weiwei Cai
        Monday, March 28, 2016 9:39 AM
    • Thanks for [Kamlesh Kumar]’s help.

      Hi Ashraf alngar,

      Which version or Visual Studio 2015 are you using? Please install the latest update for VS2015 to check whether it can be fixed. The latest update for VS 2015 current now is Update 1. Please download and install from below link.

      https://www.microsoft.com/en-us/download/details.aspx?id=49989

      Please try [Kamlesh Kumar]’s steps first to check whether it can fix your problem or not. If the problem has been fixed, please mark the helpful reply as answer, which is benefit to other communities who has the same problem.

      If the problem still exist, please use http://aka.ms/vscollect  to gather the VS and .Net Frameowrk installation logs. After using it, you will find vslogs.cab from %temp% folder. Please upload the file
      to Onedrive and share the link here.

      Best Regards,
      Weiwei

    • Remove From My Forums
    • Question

    • I am getting error on creating even the empty web application project. The error message is as given below:

      The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

      I am using following build of Visual Studio:

      Visual Studio Professional 2013. Version 12.0.30723.00 Update 3

      Looks like it is the problem with the installation of the visual studio. But I can’t take risk of re-installing now because it would stop my going on development work.

      Any would help to resolve this would be appreciated.

      P.S. I am also having Visual Studio 2010 and Visual Studio 2012 Ultimate on my system.


      Regards, Randeep

    Answers

    • Hello Randeep,

      Will you get the same error when creating any other apps, like C# WinForm?

      If only web application project has the problem, you can try the following to reset the templates:

      1. Please open Windows Explorer, and navigate to  <Visual Studio Installation Path>Common7IDE (by default is C:Program Files Microsoft Visual Studio 12.0Common7IDE);
      2. Delete the ItemTemplatesCache, ProjectTemplatesCache folder;
      3. Open Visual Studio Tools/Developer Command Prompt for VS2013
        under Start menu -> All Programs -> Microsoft Visual Studio 2013 -> Visual Studio Tools (run it with Administrator privilege: right-click the program -> Run as administrator);
      4. Run the devenv /InstallVSTemplates switch;
      5. Run the devenv /Setup switch

      If all your projects get this error, please try repair the installaiton from control panel first. By the way, can you use Visual Studio Web projects before you get this error? And have you tried to use the Visual Studio Update 4, I see you still used
      Update 3, is there any reason for you to still use the Update 3 version?

      Best regards,


      Barry
      We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

      Click
      HERE to participate the survey.

      • Marked as answer by

        Thursday, April 9, 2015 11:49 AM

    • Remove From My Forums
    • Question

    • I am getting error on creating even the empty web application project. The error message is as given below:

      The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

      I am using following build of Visual Studio:

      Visual Studio Professional 2013. Version 12.0.30723.00 Update 3

      Looks like it is the problem with the installation of the visual studio. But I can’t take risk of re-installing now because it would stop my going on development work.

      Any would help to resolve this would be appreciated.

      P.S. I am also having Visual Studio 2010 and Visual Studio 2012 Ultimate on my system.


      Regards, Randeep

    Answers

    • Hello Randeep,

      Will you get the same error when creating any other apps, like C# WinForm?

      If only web application project has the problem, you can try the following to reset the templates:

      1. Please open Windows Explorer, and navigate to  <Visual Studio Installation Path>Common7IDE (by default is C:Program Files Microsoft Visual Studio 12.0Common7IDE);
      2. Delete the ItemTemplatesCache, ProjectTemplatesCache folder;
      3. Open Visual Studio Tools/Developer Command Prompt for VS2013
        under Start menu -> All Programs -> Microsoft Visual Studio 2013 -> Visual Studio Tools (run it with Administrator privilege: right-click the program -> Run as administrator);
      4. Run the devenv /InstallVSTemplates switch;
      5. Run the devenv /Setup switch

      If all your projects get this error, please try repair the installaiton from control panel first. By the way, can you use Visual Studio Web projects before you get this error? And have you tried to use the Visual Studio Update 4, I see you still used
      Update 3, is there any reason for you to still use the Update 3 version?

      Best regards,


      Barry
      We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

      Click
      HERE to participate the survey.

      • Marked as answer by

        Thursday, April 9, 2015 11:49 AM

    Ошибка 0x80070002 может появиться у пользователей любой версии Windows. Возникает она по самым разным причинам, иногда может показаться, что вообще без повода. На самом деле для неё существует порядка пяти тысяч ситуаций! Все они вызывают появление одинакового сообщения. Однако есть наиболее распространённые действия, которые приводят к этой ошибке, и их полезно знать. Кроме того, ошибку эту вполне можно устранить.

    Как самостоятельно убрать ошибку 0x80070002 в Windows

    Методика устранения ошибки 0x80070002 в Windows.

    О чём говорит код ошибки 0x80070002

    Код ошибки с кодом номером 0x80070002 означает, что в системе произошел серьёзный сбой. Обычно это бывает при обновлении, но это лишь самая распространённая причина, среди множества прочих. Причём такое случается не только при штатном обновлении системы, но и в процессе установки, например, версии 10 поверх Windows 7-8. Эта же ошибка нередко встречается при нарушении процесса восстановления системы, при сбое в процессе её установки, при проблемах с запуском каких-либо служб. Если, например, присвоить диску другую букву, то также появится эта ошибка. Она может быть из-за вируса или неправильной работы антивируса, но такое бывает довольно редко. Наиболее распространённые ситуации описаны ниже.

    Ошибка 0x80070002 — как исправить в Windows 10 в разных случаях

    В целом, ошибка 0x80070002 в различных версиях Windows бывает по похожим причинам, но её устранение может потребовать разных методов. Windows 10, однако, сейчас является самой активно развивающейся системой, которая часто обновляется, поэтому и ошибка эта не редкость. Вариантов, как исправить проблему, несколько – искать её источник и исправлять неполадки или использовать особую программу, которая всё сделает сама. Для Windows 7-10 такую утилиту можно скачать с официального сайта (https://support.microsoft.com/ru-ru/kb/910336). Установка производится обычным способом, и вопросов не вызывает. При самостоятельном поиске источника проблем придётся работать с командной строкой с правами администратора. В WindowsXP и 7 они даются по умолчанию, и проблем с этим не возникает, но в версиях 8 и 10 они отключены. Поэтому предварительно нужно их включить. Нужно вызвать командную строку сочетанием клавиш Win+R, ввести команду lusrmgr.msc и нажать Enter. Затем нужно зайти в меню «Пользователи-Администратор-Свойства», и отключить чекбокс пункта отключения администраторской учётной записи. Права администратора включатся после перезагрузки. Дальнейшие действия схожи в различных версиях Windows, отличаясь в мелочах, связанных с их интерфейсом.

    Отключение администраторской учётной записи

    Сбой при обновлении Windows

    Ошибка 0x80070002 в версии Windows 10 при обновлении может появиться в таких ситуациях:

    • Если установлены какие-нибудь программы для выключения функции слежки. Часто они просто блокируют в системном файле hosts некоторые сервера Microsoft, откуда скачиваются файлы, или создают запрет в брандмауэре.
    • Когда в системе неверно выставлены дата, число или часовой пояс.
    • Если в настройках браузера были прописаны прокси-серверы.

    Эти проблемы устраняются довольно просто, так как пользователь их сам и создал. Иногда ошибка случается при установке обновления, если Windows 10 не полностью поддерживается аппаратно. Так, например, случилось у многих с обновлением 1803 – на некоторых моделях ноутбуков и даже на стационарных компьютерах с некоторыми моделями материнских плат возникла ошибка 0x80070002. Это решается удалением обновления до появления следующего и обращением к производителю оборудования. Если вы регулярно обновляете Windows 10, то такие проблемы бывают редко.

    Запуск Центра обновления Windows

    Ошибка будет, когда служба обновлений вообще не работает. Убедиться в этом можно, зайдя в «Панель управления» — «Администрирование» — «Службы». Среди служб надо найти и выбрать «Центр обновления Windows», и правой кнопкой мыши вызвать меню, где есть пункты «Обновить» и «Перезапустить». Для Windows 10 список служб можно быстро вывести с помощью командной строки – нажать Win+R и ввести команду services.msc. Нужно остановить службу обновления и очистить папку DataStore, находящуюся по пути C:WindowsSoftwareDistributionDataStore – здесь находятся временные файлы. Потом обновления надо снова включить.

    При установке Windows

    Ошибка 0x80070002 при установке обычно бывает из-за повреждённого дистрибутива, когда некоторые файлы невозможно скопировать. Например, когда установка ведётся с дефектной флешки, поцарапанного или неправильно записанного диска. Решается это так:

    • Для Windows 10 нужно повторить скачивание официального дистрибутива. На диск его надо записывать на малой скорости.
    • При установке Windows 7 ошибка с кодом 0x80070002 может возникать из-за использования разных сборок, так как официально эта версия уже не поддерживается. Сборки могут быть неполными.

    Неудачная установка может быть даже следствием скачивания образа системы при нестабильном интернете – достаточно самой небольшой ошибки, чтобы весь дистрибутив оказался дефектным.

    При установке Windows

    Ошибка при восстановлении Windows

    Непредвиденная ошибка при восстановлении системы с кодом 0x80070002 не позволяет восстановиться, процесс прерывается. Это случается, когда система не может найти всех необходимых файлов. Попробовать решить проблему можно разными способами:

    • Попытаться использовать другую точку восстановления.
    • Загрузить систему в безопасном режиме и снова попробовать.
    • Загрузить компьютер с загрузочного диска или флешки и выбрать опцию восстановления системы. По окончании процесса можно попробовать ещё раз откатить систему.
    • Используя мастер диагностики, попробовать найти решение.

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

    Сбой работы мастера диагностики и устранения неполадок Windows

    Бывает, возникает проблема с мастером диагностики и устранения неполадок с той же ошибкой 0x80070002. Причиной этого бывает невозможность считать системой какие-либо файлы, обычно системные, драйвера или какие-то служебных программ. Такое бывает, когда некоторые из установленных программ работают в фоне одновременно и конфликтуют между собой – различные драйвера и обслуживающие утилиты, например. Решение следующее – нужно по возможности отключить все программы, которые непосредственно не требуются системе, и посмотреть, не уйдёт ли ошибка.

    Работа мастера устранения неполадок

    Сделать это нетрудно – вызвать командную строку сочетанием Win+R и использовать команду msconfig. В открывшемся окне на вкладке «Общие» нужно выбрать «Выборочный запуск» и снять галочки с «Загружать системные службы» и «Загружать элементы автозагрузки». Затем надо перезагрузить компьютер. Никакие лишние программы загружаться теперь не будут, и это позволит исключить их влияние. После загрузки системы в облегчённом виде надо использовать в командной строке команду sfc /scannow. Будет произведено сканирование всей системы на целостность и при необходимости выполнено восстановление. Это занимает некоторое время. Затем нужно снова использовать команду msconfig и вернуть настройки к прежним.

    Настройка параметров автозагрузки

    В других случаях

    Как исправить ошибку 0x80070002 в других случаях, кроме перечисленных? Таких ситуаций может быть очень много. Особенно часто с этими редкими ситуациями сталкиваются пользователи Windows 10, так как система развивается, и обновления закрывают одни ошибки, но могут порождать новые. Да и далеко не все «железо» поддерживает эту систему. И как тогда быть? Если ошибка появилась неожиданно и неизвестно почему, можно попробовать откатиться до более раннего состояния, воспользовавшись «Восстановлением системы». Однако для Windows 7-10 надёжнее и гораздо проще воспользоваться специальной программой, которая есть на официальном сайте именно для исправления этой проблемы и других подобных.

    Наверняка вы тоже встречались с ошибкой 0x80070002, и не раз. При каких ситуациях это случалось и что вы делали, чтобы её убрать? Делитесь в комментариях своим опытом, это наверняка пригодится другим читателям.

    Вопрос:

    Я пытаюсь создать новый проект в visual studio.it дает некоторую ошибку

    пожалуйста, дайте мне несколько предложений….. enter image description here

    Я этого не знаю.
    Я пытаюсь переустановить, и снова появляется такая же ошибка.

    Я пробую эту работу…

    Ответ №1

    Попробуйте 1 первый, если не другой

    • Перейдите в Extentions and updates, затем найдите Nuget и удалите его,
      перезапустите визуальную студию, снова установите Nuget, затем снова перезапустите.
      вы должны иметь возможность создать свой новый проект.
    • Восстановите свою Visual Studio 2013 или 2015

    Ответ №2

    Я использую Visual Studio 2015 Express Web и имею ту же проблему. Я много искал для решений, и ни одна из них не работала:

    • Переустановите Nuget для Visual Studio 2015
    • Замените Nuget для Visual Studio 2015 с прежним Nuget
    • Запустить Visual Studio как администратор
    • Изменить/Удалить файл IISExpress applicationhost.config
    • Переустановите IISExpress

    Единственное, что разрешило это: Repair-install Visual Studio:

    • Нажмите Windows + R
    • Введите appwiz.cpl и нажмите Enter
    • Щелкните правой кнопкой мыши запись “Microsoft Visual Studio Express 2015 для Интернета” и нажмите “Восстановить”
    • Будьте терпеливы…

    Примечание.. Это приведет к переустановке всех удаленных вами пакетов, поскольку вам не нужны они (например, собственный клиент Microsoft SQL Server).

    Ответ №3

    Перейдите по ссылке: VS2013- > Инструменты- > Расширения и обновления- > Онлайн-поиск для NuGet и установка. Исправлена ​​проблема в 2013 году REL

    Ответ №4

    Я столкнулся с аналогичной проблемой при создании основного проекта .NET в VS 2015, и он разрешил восстановление .NET Core. Возможная причина: ядро ​​.NET было установлено, связанное с версией сообщества VS, но позже я удалю сообщество VS и переустановил профессиональную версию, но .NET Core не был удален с удалением версии сообщества. После восстановления ядра .NET с панели управления он работает сейчас.

    Ответ №5

    Вам нужно установить менеджер пакетов Nuget из Tools- > Extensions and Updates → online- > и найти “Nuget package manager” из панели поиска и нажать “Установить”.

    Ответ №6

    Решение Андрея Свирида:

    Изменение установки Visual Studio 2015 и снятие флажка Microsoft Web Developer Tools
    Удаление папки C:Program Files (x86)Microsoft Visual Studio 14.0Common7IDEExtensionsMicrosoftWeb ToolsDNX, оставленной из предыдущей версии инструментов.
    Удаление% LocalAppData%MicrosoftVisualStudio14.0ComponentModelCache
    Удаление% LocalAppData%MicrosoftVisualStudio14.0devenv.exe.config
    Выполнение ремонта инструментария предварительного просмотра.

    Ответ №7

    У вас есть соответствующие компоненты, установленные вместе с Visual Studio?

    Я получал эту ошибку при попытке добавить новый проект Axure Mobile Services. Зная, как долго восстанавливается Visual Studio, я надеялся избежать этого.

    Для меня исправлено открытие программ и функций и выбор “Изменить” Visual Studio, а не “Ремонт”.

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

    Ответ №8

    Я столкнулся с той же проблемой, когда пытаюсь создать веб-приложение ASP.NET MVC 4 в VS 2012.

    Чтобы устранить эту проблему В VS 2012 нажмите “Инструменты” (меню) → “Расширения и обновления” (пункт меню) → в окне “Расширения и обновления” нажмите “Обновить”.

    Установите ожидающие обновления для VS 2012, а также для Nuget.

    Перезапустите VS 2012.

    Ответ №9

    У меня была такая же ошибка с использованием сообщества VS 2017 (и предыдущего) при попытке открыть файл .cs или попытке открыть свойства проекта.
    Все это на новой установке VS на новой установке Windows 10…

    Я нашел 2 решения:

    Запустите VS как admin (что не является хорошим выбором и может препятствовать отладке drag & drop в ваше приложение).

    или лучше:

    Измените параметры безопасности вашей папки% temp% на “все – полный контроль”.:)

  • Microsoft teams код ошибки 42b
  • Microsoft visual studio location simulator sensor ошибка
  • Microsoft teams windows 7 ошибка сценария
  • Microsoft visual foxpro серьезная ошибка код исключения c0000005
  • Microsoft store ошибка при установке приложения