34

Can anybody shed any light on the above error? I've tried with both Express and Ultimate editions of VS 2013.

I'm running 64-bit Windows 7.

Solutions to similar problems I've found tend to be targetting x86 rather than AnyCPU from the Solution explorer. However, I can't even build the solution to explore it.

The new project I'm trying to build is c# ASP.net MVC.

ForceMagic
  • 6,230
  • 12
  • 66
  • 88
user1405195
  • 1,667
  • 4
  • 22
  • 35
  • 1
    Start the Visual Studio command prompt as administrator and try `devenv /safemode`. If that doesn't work try running `devenv /setup` and then open the IDE. – Ovidiu Sep 17 '13 at 11:55
  • 1
    I tried creating a new project in both safemode and setup and received the same error prompt – user1405195 Sep 17 '13 at 15:07
  • 2
    Is this problem solved ? Please mention the solution if it is – Bilal Fazlani Nov 03 '13 at 09:54
  • @BilalFazlani This is not a good pratice to mention the solution in the Question. First of this is not a forum. Second, the accepted answer or the highest scored answer will play the role for the "solution". If you are in doubt, please visit the help section as a reminder http://stackoverflow.com/help Regards. – ForceMagic Mar 12 '14 at 14:43

13 Answers13

13

Thanks for all the replies and suggestions. On the PC I'm using, the Documents directory and it's contents are encrypted by default - including my IISExpress. Removing the encryption solved the problem.

user1405195
  • 1,667
  • 4
  • 22
  • 35
  • 4
    can you please say how you found out that your document directory was encrypted, plus how you removed the encryption? – Jack M Nov 25 '13 at 20:30
  • 3
    Sure - Windows shows encrypted files and folders in green. http://www.askvg.com/fix-some-file-and-folder-names-showing-in-blue-or-green-color-in-windows-explorer/ To remove encryption, right-click file/folder then Properties > Advanced > Encrypt contents to secure data - uncheck. – user1405195 Nov 25 '13 at 22:50
  • I did it but unfortunately it didn't solve my issue not sure about others. I had VS2012, I uninstalled it, and installed the VS2013 professional – Jack M Nov 26 '13 at 08:34
  • I have this issue on two different Windows 8 PCs and this wasn't related to either. Interestingly @Asaf's solution of running Visual Studio 2013 as an administrator worked for me. – Robb Vandaveer Nov 26 '13 at 16:15
  • 1
    I believe it also happens if your documents folder are on a network share. – Dessus Apr 25 '14 at 21:58
  • Can you post which folder was encrypted exactly? my document is not encrypted, it should be some sub folders. – cdytoby Jun 11 '15 at 12:51
  • That did not solve it for me. BUT decrypting my project directory did. Thumbs up! – Doug Null Jul 28 '16 at 14:21
6

Have you tried to manually install NuGet for VS 2013?

I had a similar issue, until I found that the VS 2013 setup - for some reason - did not install the NuGet package manager. After I installed it manually everything worked fine.

Hannes Sachsenhofer
  • 1,835
  • 1
  • 23
  • 38
  • We haven't been able to reproduce VS 2013 not installing NuGet PM. Did you upgrade from Beta? Which SKU? – RickAndMSFT Nov 04 '13 at 18:58
  • No, no upgrade. I had this issue on two different machines, both with a completely fresh Win8.1 and VS2013 Premium. During setup I only selected the "Web Development" bits of VS2013 (nothing else) - maybe here's the issue? – Hannes Sachsenhofer Nov 05 '13 at 09:30
  • @RickAnd-MSFT please check this out https://stackoverflow.com/questions/37707656/installing-template-for-vs-2015-enterprise – user786 Jun 08 '16 at 18:40
4

I'm running on Win 8.1 Pro (64 bits) with Visual Studio Express for web 2013

The were two problems in my machine, namely :

  • the applicationhost.config file in C:\Users(insert your user log in name)\Documents\IISExpress\config was not well formed. It seems this problem occurs because the .NET configuration system reads the applicationHost.config file without locking it. If the IIS configuration file is being written to while it is being read by the Windows Activation Service (WAS), that file may be corrupted. Anyhow, I binged around and downloaded a pristine copy of it.

  • After fixing the above problem, I subsequently encountered the same error message (unspecified error - exception from hresult: 0x80004005 (e_fail) ). I then tried to create an MVC web project via another way. I created a blank solution and added an MVC web project to it and this time the IDE spewed out a different message. The pop-up window dumped a cryptic line like so, "IIS could not read C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config - error". I proceeded to uninstall IIS 8.0 and re-installed the application. And voila, I can now create MVC web apps again! :)

wanglabs
  • 57
  • 4
  • 1
    I also uninstalled and reinstalled IIS 8.0 Express, and it solved my problem. I had the 0x80004005 problem on a fresh install of vs2013pro as well as after I upgraded to Update 1, both with .NET 4.5.0 and 4.5.1. Someone provided the link to IIS 8.0 Express below, but here it is again for convenience: http://www.microsoft.com/en-us/download/details.aspx?id=34679 – Dale Barnard Apr 28 '14 at 04:27
  • My applicationHost.config file was actually empty. You can get old versions of the file by searching "C:\inetpub\history" for applicationHost.config. This link helped me as well as your answer: http://trshelpdesk.com/kb/a180/fixing-corrupted-applicationhost_config-file-in-iis-7.aspx – Jarle Bjørnbeth Apr 23 '15 at 12:53
4

FOUND SOLUTION

Go to Control Panel -> Programs and Features -> Select your Visual Studio Version and hit "Change"

1) Click MODIFY and enable Web Developer Tools

2) Enable Web Developer Tools

3) Click Update

rohit patil
  • 111
  • 4
3

Removing Read Only property from IISExpress\Config files (applicationhost, aspnet, redirection) solved the problem for me.

3

windows 7 x64, VS 2013 update 4.

repair IIS Express fix my issue http://www.microsoft.com/en-us/download/details.aspx?id=34679

3

Run Visual studio as administrator, it will solve this issue.

Tunaki
  • 132,869
  • 46
  • 340
  • 423
kushal
  • 181
  • 14
2

I'm using Windows 8 x64 and i've found a solution by installing IIS Express 8 x64.

http://www.microsoft.com/en-us/download/details.aspx?id=34679

  • Most probably VS2013 does require IIS Express. In my original installation I did install it but I removed it later. From that moment VS2013 failed to create new projects plus other minor issues. So I simply install IIS Express from the above link, then I ran VS2013 and all the issues were fixed! – Gianpiero Sep 08 '14 at 16:14
0

I had the same error. I solved the error by running Visual Studio 2013 at "run as administrator" mode as when you use web application projects IIS Express is involved.

Asaf
  • 17
  • 1
  • I have this issue on two separate Windows 8 PCs and this solution also worked for me. Usually IIS Express isn't so finicky. – Robb Vandaveer Nov 26 '13 at 16:17
0

I got the same Unspecified error when creating a new Web Application with MVC. I then tried to install the NuGet Package Manager for VS 2013 and got a little bit more detail on what was happening:

11/13/2013 9:16:17 PM -     Supported Products : 
11/13/2013 9:16:17 PM -         Microsoft.VisualStudio.Pro
11/13/2013 9:16:17 PM -             Version : [12.0]
11/13/2013 9:16:17 PM -         Microsoft.VisualStudio.IntegratedShell
11/13/2013 9:16:17 PM -             Version : [12.0]
11/13/2013 9:16:17 PM -         Microsoft.VisualStudio.VWDExpress
11/13/2013 9:16:17 PM -             Version : [12.0]
11/13/2013 9:16:17 PM -         Microsoft.VisualStudio.VPDExpress
11/13/2013 9:16:17 PM -             Version : [12.0]
11/13/2013 9:16:17 PM -         Microsoft.VisualStudio.VSWinExpress
11/13/2013 9:16:17 PM -             Version : [12.0]
11/13/2013 9:16:17 PM -         Microsoft.VisualStudio.VSWinDesktopExpress
11/13/2013 9:16:17 PM -             Version : [12.0]
11/13/2013 9:16:17 PM - 
11/13/2013 9:16:17 PM -     References      : 
11/13/2013 9:16:17 PM - 
11/13/2013 9:16:17 PM - Searching for applicable products...
11/13/2013 9:16:23 PM - Failed to initialize settings for Isolated Shell C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\ssms.exe: The network path was not found. (Exception from HRESULT: 0x80070035)
11/13/2013 9:16:23 PM - Found installed product - Microsoft Visual Studio 2010 Ultimate
11/13/2013 9:16:23 PM - Found installed product - Microsoft Visual Studio Ultimate 2012
11/13/2013 9:16:23 PM - Found installed product - Microsoft Visual Studio Premium 2012 
11/13/2013 9:16:23 PM - Found installed product - Microsoft Visual Studio Professional 2012
11/13/2013 9:16:23 PM - Found installed product - Microsoft Visual Studio 2012 Shell (Integrated)
11/13/2013 9:16:23 PM - Found installed product - Microsoft Visual Studio Premium 2013
11/13/2013 9:16:24 PM - System.IO.FileNotFoundException: The network path was not found. (Exception from HRESULT: 0x80070035)
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at Microsoft.VisualStudio.Settings.ExternalSettingsManager.GetScopePaths(String applicationPath, String suffixOrName, String vsVersion, Boolean isLogged, Boolean isForIsolatedApplication)
   at Microsoft.VisualStudio.Settings.ExternalSettingsManager.CreateForApplication(String applicationPath)
   at VSIXInstaller.App.GetExtensionManager(SupportedVSSKU sku)
   at VSIXInstaller.App.GetExtensionManagerForApplicableSKU(SupportedVSSKU supportedSKU, IInstallableExtension installableExtension, List`1 applicableSKUs)
   at VSIXInstaller.App.InitializeInstall()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()

I tried uninstalling VS 2010 (since I don't use it anymore) with no luck. I then connected to my work VPN and then when opening VS2013 I got a message stating it was looking for my settings file in an odd place:

C:\Users\Zach\\\SomeNetworkServer\something\something

I updated the path for settings under Tools > Options > Import and Export Settings (which was actually the same odd path) and both NuGet and VS2013 now seem to be working correctly.

I have no idea where it got that path but I definitely saw different behavior when I was on my work's VPN vs not.

0

I corrected this error by repairing IIS express. You can as well reinstall IIS express.

hunch_hunch
  • 2,283
  • 1
  • 21
  • 26
0

After two days of trying to resolve this issue.

VS 2012: All good (just disabled IIS)

VS 2013: 0x80004005: Unspecified error

VS 2015: 0x80004005: Unspecified error

IIS Express via command line: Error cannot find "My documents\IIS Express\config\applicationhost.config"

Solution:

Copied applicationhost.config AND redirection.config from %programfiles%\IIS Express\config\templates\PersonalWebServer\ into the "IIS Express\config" folder under My Documents.

Make sure you copy the redirection.config file, it WILL NOT warn you about this, just fail with the obscure 0x80004005 error. Had to monitor file I/O to track it down.

Also open applicationhost.config in notepad and make sure that the %IIS_BIN%\AppServer\empty_wwwroot folder is WRITEABLE, most likely this folder is under "%programfiles%\IIS Express" and thus not writeable by default.

Also quite possible you need to set %IIS_BIN% yourself to "%programfiles%\IIS Express".

So:

  • Make sure %IIS_BIN% is set

  • Make sure you have BOTH config files copied into the config folder

  • Make sure the wwwroot is writeable

    • Make sure the "empty_wwwroot" referenced in the .config matches the x86 / x64 setting in Visual Studio (VS uses x86 by default, can be changed to x64 under Project settings => Web Projects)
user3734274
  • 351
  • 1
  • 3
  • 5
-1

I am facing exactly same Problem and this trick worked for mine. i go to file

C:\Users\user\Documents\IISExpress\config\applicationhost.config

where i found one of tag is missing "<" like this

application path="/" applicationPool="Clr4IntegratedAppPool"> 

i just put "<" in front of Application like this

<application path="/" applicationPool="Clr4IntegratedAppPool"> 

It looks very silly but believe me both VS13 and VS13 express working perfectly.

Umar Abbas
  • 4,041
  • 2
  • 23
  • 21