C# Visual Studio 2013 > 新项目 > 未指定错误(hresult 异常:0x80004005 (e_fail))
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18848925/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Visual Studio 2013 > New project > unspecified error (exception from hresult: 0x80004005 (e_fail))
提问by user1405195
Can anybody shed any light on the above error? I've tried with both Express and Ultimate editions of VS 2013.
任何人都可以对上述错误有所了解吗?我已经尝试过 VS 2013 的 Express 和 Ultimate 版本。
I'm running 64-bit Windows 7.
我正在运行 64 位 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.
我发现的类似问题的解决方案往往是针对 x86 而不是来自解决方案资源管理器的 AnyCPU。但是,我什至无法构建解决方案来探索它。
The new project I'm trying to build is c# ASP.net MVC.
我正在尝试构建的新项目是 c# ASP.net MVC。
采纳答案by user1405195
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.
感谢所有的回复和建议。在我使用的 PC 上,Documents 目录及其内容默认是加密的——包括我的 IISExpress。删除加密解决了这个问题。
回答by Asaf
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.
我有同样的错误。我通过在“以管理员身份运行”模式运行 Visual Studio 2013 解决了该错误,因为当您使用涉及 IIS Express 的 Web 应用程序项目时。
回答by Hannes Sachsenhofer
Have you tried to manually install NuGetfor VS 2013?
您是否尝试过为 VS 2013手动安装 NuGet?
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.
我有一个类似的问题,直到我发现 VS 2013 安装程序 - 由于某种原因 - 没有安装 NuGet 包管理器。我手动安装后一切正常。
回答by Umar Abbas
I am facing exactly same Problem and this trick worked for mine. i go to file
我面临完全相同的问题,这个技巧对我有用。我去存档
C:\Users\user\Documents\IISExpress\config\applicationhost.config
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.
它看起来很傻,但相信我 VS13 和 VS13 express 工作得很好。
回答by zlongren
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:
使用 MVC 创建新的 Web 应用程序时,我遇到了相同的未指定错误。然后我尝试为 VS 2013 安装 NuGet 包管理器,并获得了关于发生了什么的更多细节:
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 Server0\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:
我尝试卸载 VS 2010(因为我不再使用它了),但没有成功。然后我连接到我的工作 VPN,然后在打开 VS2013 时我收到一条消息,说明它正在一个奇怪的地方寻找我的设置文件:
C:\Users\Zach\\\SomeNetworkServer\something\something
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.
我更新了工具 > 选项 > 导入和导出设置下的设置路径(实际上是相同的奇怪路径),NuGet 和 VS2013 现在似乎都可以正常工作。
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.
我不知道它是从哪里得到这条路径的,但是当我使用我工作的 VPN 时,我确实看到了不同的行为。
回答by Julián Taborda
I'm using Windows 8 x64 and i've found a solution by installing IIS Express 8 x64.
我使用的是 Windows 8 x64,我通过安装 IIS Express 8 x64 找到了解决方案。
http://www.microsoft.com/en-us/download/details.aspx?id=34679
http://www.microsoft.com/en-us/download/details.aspx?id=34679
回答by wanglabs
I'm running on Win 8.1 Pro (64 bits) with Visual Studio Express for web 2013
我正在使用 Visual Studio Express for web 2013 在 Win 8.1 Pro(64 位)上运行
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! :)
C:\Users(插入您的用户登录名)\Documents\IISExpress\config 中的 applicationhost.config 文件格式不正确。出现此问题似乎是因为 .NET 配置系统在未锁定的情况下读取 applicationHost.config 文件。如果在 Windows 激活服务 (WAS) 读取时写入 IIS 配置文件,则该文件可能已损坏。无论如何,我狂奔并下载了它的原始副本。
解决上述问题后,我随后遇到了相同的错误消息(未指定的错误 - hresult 异常:0x80004005 (e_fail) )。然后我尝试通过另一种方式创建一个 MVC web 项目。我创建了一个空白解决方案并向其中添加了一个 MVC Web 项目,这一次 IDE 发出了不同的消息。弹出窗口转储了一条像这样的神秘行,“IIS 无法读取 C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config - 错误”。我继续卸载 IIS 8.0 并重新安装该应用程序。瞧,我现在可以再次创建 MVC Web 应用程序了!:)
回答by user3508667
If the other solutions in this thread didn't help try updating your graphics drivers. I wasn't getting an error like above, but I couldn't click options in the create new project window.
如果此线程中的其他解决方案无济于事,请尝试更新您的图形驱动程序。我没有收到上述错误,但我无法在创建新项目窗口中单击选项。
I had installed uninstalled and reinstalled VS 2013 professional, premium and express multiple times, but in the end it was getting my latest graphics drivers, the beta release, that caused this issue to go away.
我已多次安装卸载并重新安装 VS 2013 Professional、Premium 和 Express,但最终它获得了我最新的图形驱动程序,即测试版,导致此问题消失。
I'm running Windows 8.1 (with the new update), and Radeon HD7850.
我正在运行 Windows 8.1(带有新更新)和 Radeon HD7850。
回答by QuestionableSolutions
Removing Read Only property from IISExpress\Config files (applicationhost, aspnet, redirection) solved the problem for me.
从 IISExpress\Config 文件(应用程序主机、aspnet、重定向)中删除只读属性为我解决了这个问题。
回答by Prince Olelewe
I corrected this error by repairing IIS express. You can as well reinstall IIS express.
我通过修复 IIS express 更正了这个错误。您也可以重新安装 IIS express。