无法加载文件或程序集...参数不正确 [英] Could not load file or assembly ... The parameter is incorrect

查看:243
本文介绍了无法加载文件或程序集...参数不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我遇到了以下异常在C#中的解决方案:

Recently I met the following exception at C# solution:

错误2未能加载文件或程序集Newtonsoft.Json,
  版本= 3.5.0.0,文化=中性公钥= b9a188c8922137c6或
  它的一个依赖。参数不正确。 (异常来自
  HRESULT:80070057(E_INVALIDARG))

Error 2 Could not load file or assembly 'Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b9a188c8922137c6' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

这不取决​​于无论是在我的code或总成(如 Newtonsoft.Json 在这种情况下)的名称。

This does not depend either on my code or on the name of assembly (like Newtonsoft.Json in this case).

当我从解决方案中删除这个dll编译讲述另一个相同的异常。所以我想的东西在768,16我的电脑打开/关闭:)

When I delete this dll from the solution the compiler tells about another in the same exception. So I suppose something shoud be turned off/on at my PC :)

推荐答案

看起来像一个已损坏的组件被引用。

Looks like a corrupted assembly being referenced.

清除这两个:


  1. 项目的\\ bin文件夹

  1. the \bin folder of your project

temp文件夹中(应该是 C:\\用户\\ your_username \\ AppData的\\在Windows本地的\\ Temp \\临时ASP.NET文件 7)

the temp folder (should be C:\Users\your_username\AppData\Local\Temp\Temporary ASP.NET Files in windows 7)

和看看错误仍然发生

这篇关于无法加载文件或程序集...参数不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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