c# - HRESULT 异常 : 0x80070057 (E_INVALIDARG)

标签 c# wpf .net-assembly

我有一个 WPF 应用程序。在构建它时出现以下错误:

Could not load file or assembly or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

应用程序正在尝试从虚拟驱动器(作为调试文件夹)加载程序集

例如:[subst r: c:[my Assembly bin pth]

之前我将 c:\bin 安装为网络驱动器,但出现以下错误。

This assembly may have been downloaded from the Web. If an assembly has been downloaded from the Web, it is flagged by Windows as being a Web file, even if it resides on the local computer. This may prevent it from being used in your project. You can change this designation by changing the file properties. Only unblock assemblies that you trust. See http://go.microsoft.com/fwlink/?LinkId=179545 for more information.

编辑: 顺便说一句,我在属性窗口中找不到取消阻止按钮。

最佳答案

清除项目的临时框架文件:

对于 Windows 7,路径是:

C:\Users\[username]\AppData\Local\Temp\Temporary ASP.NET Files\

对于路径中带有“Framework”的 64 位系统,完整路径为:

C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\

http://www.solutioncottage.com/ShowSolution.aspx?solID=59

关于c# - HRESULT 异常 : 0x80070057 (E_INVALIDARG),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14871449/

相关文章:

c# - 如何在 .Net WPF 应用程序中使用 Serilog 自动尾部(删除)旧日志?

c# - 使用NServiceBus时,MVVM中的ObservableCollection不变

wpf - 无法使用表达式比较 NAN

c# - 仅当 ObservableCollection 成员不为 Null 时才绑定(bind) DataContext

python - 添加对名称和命名空间中有点的 .net 程序集的引用

azure - 如何在 Azure Function 中添加框架程序集

c# - 我的图片没有出现在 listcontrol

堆算法的 C# 实现不起作用

c# - 嵌套在 GridView 中的 Databound 转发器不会更新

c# - 加载两个版本的程序集时,Visual Studio 2015 无法评估变量