none
Unable to create a new ASP.Net Project. The system cannot find the file specified (Exception from HRESULT: 0x80070002)

    Question

  • When I create a new ASP.NET Web application It creates the project but it is empty, there are no forms inside of it. This was working a month ago but started having this issue recently. I have not updated it specifically since the last time it was working.
    Tuesday, December 27, 2016 10:50 PM

Answers

  • 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>\Common7\IDE (by default is <C:\Program Files \Microsoft Visual Studio 14.0\Common7\IDE>);
    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%\Microsoft\VisualStudio\Version\ActivityLog.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 KurtChin Wednesday, December 28, 2016 2:58 PM
    Wednesday, December 28, 2016 11:43 AM

All replies

  • 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>\Common7\IDE (by default is <C:\Program Files \Microsoft Visual Studio 14.0\Common7\IDE>);
    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%\Microsoft\VisualStudio\Version\ActivityLog.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 KurtChin Wednesday, December 28, 2016 2:58 PM
    Wednesday, December 28, 2016 11:43 AM
  • It was the reinstallation of the NuGet that solved my issue, thanks for the help.
    Wednesday, December 28, 2016 2:58 PM