无法加载文件或程序HRESULT:0x80131515(当添加控制器到具有网络驱动器上集的引用MVC项目) [英] Could not load file or assembly HRESULT: 0x80131515 (When adding controller to MVC project that has assembly references on network drive)

查看:302
本文介绍了无法加载文件或程序HRESULT:0x80131515(当添加控制器到具有网络驱动器上集的引用MVC项目)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到了这一点:<一href=\"http://stackoverflow.com/questions/3007190/vsts-2010-sgen-error-could-not-load-file-or-assembly-exception-from-hresult\">VSTS 2010 SGEN:错误:无法加载文件或程序(从HRESULT异常:0x80131515)并没有一个答案工作。它还在我建立或任何不出现。我可以运行这个项目很好,它发生时,我尝试添加一个实体框架模板控制器:

I've seen this: VSTS 2010 SGEN : error : Could not load file or assembly (Exception from HRESULT: 0x80131515) and none of the answers work. It also doesn't appear when I build or anything. I can run the project fine, it happens when I try to add an entity framework templated controller:

然后,我得到这个错误:

Then I get this error:

所有的项目文件都在我的网络共享,因为这是我的文档驻留我们的工作。这里是我的尝试:

All project files are on my network share because that is where My Documents resides for our work. Here is what I tried:

1)关闭发电机组序列组装项目设置,开,关,自动和

1) Turning Generator Serialization Assembly in project settings to on, off, and auto.

2)添加sgen.exe.config到C:\\ Program Files文件\\微软的SDK \\ WINDOWS \\ v7.0A \\ BIN \\ NETFX 4.0工具有以下code:

2) Adding sgen.exe.config to C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools with the following code:

<configuration>
 <runtime>
   <loadFromRemoteSources enabled="true" />
 </runtime>
</configuration>

3)试图来疏通组件,但我不得不在属性选项卡没有疏通选项。

3) Tried to unblock the assemblies, but I had no unblock option in the properties tab.

这些解决方案都没有工作。没有人有任何想法,我怎么能解决这个问题?
从任何的N​​uGet自定义程序集或我自己的项目因地理位置现有的网络空间出现此错误,而只是试图添加一个EF模板控制器时。我可以建立并运行程序的罚款。

None of these solutions work. Does anyone have any idea how I can fix this??? This error occurs for any custom assembly from nuget or my own projects due to their location existing on the network space, but only when trying to add an EF templated controller. I can build and run the program fine.

推荐答案

试着增加你的&LT; loadFromRemoteSources启用=真/&GT; C:\\ [Visual Studio 2010的安装目录] \\ Common7 \\ IDE \\ devenv.exe.config 正下方&LT;&运行GT; ,看看帮助:)

Try adding your <loadFromRemoteSources enabled="true" /> to C:\[Visual Studio 2010 Install Dir]\Common7\IDE\devenv.exe.config directly below <runtime> and see if that helps :)

这篇关于无法加载文件或程序HRESULT:0x80131515(当添加控制器到具有网络驱动器上集的引用MVC项目)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆