无法加载文件或程序集“System.Net.Http.Formatting”或它的一个依赖。该系统找不到指定的路径 [英] Could not load file or assembly 'System.Net.Http.Formatting' or one of its dependencies. The system cannot find the path specified

查看:791
本文介绍了无法加载文件或程序集“System.Net.Http.Formatting”或它的一个依赖。该系统找不到指定的路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助任何人...
我有使用实践原因小MVC应用程序......但现在我已经遇到了一个错误每次我尝试调试...


  

    

无法加载文件或程序集System.Net.Http.Formatting或它的一个依赖。该系统找不到指定的路径。


  

我GOOGLE了所有可能出现的问题...
我使用.NET 4.5 ...

这不可能是DLL文件,因为我使用的.NET 4.5 ...
预先感谢您...


解决方案

每当我有一个的NuGet错误,如这些我通常采取下列步骤操作:


  1. 转到包文件夹中的Windows资源管理器,并删除它。

  2. 开启Visual Studio和进入的工具的>的库包管理器的>的软件包管理器设置的并在左侧的软件包管理器项目下有一个清除包缓存按钮。单击此按钮,请确保复选框允许的NuGet下载缺失的构建过程中包被选中。

  3. 清洁液

  4. 然后右键单击在Solution Explorer解决方案,使包装的NuGet恢复

  5. 生成解决方案

考虑到所有这些步骤几乎总是恢复所有的包和dll的我需要为我的MVC计划。


修改>>>

对于Visual Studio 2013及以上,步骤2)应改为:

<醇开始=2>
  • 开启Visual Studio和去的工具的>的选项的>的的NuGet包管理器的和在右边有一个清除包缓存按钮。单击此按钮,请确保复选框允许的NuGet下载缺失的软件包和自动检查构建在Visual Studio中失踪的包进行检查。

  • Please help anyone... I have a small MVC app that I use for practice reasons... But now I've encountered an error everytime i try to debug...

    Could not load file or assembly 'System.Net.Http.Formatting' or one of its dependencies. The system cannot find the path specified.

    I've googled all possible issues... I'm using .Net 4.5...

    It can't be DLL file because I'm using .Net 4.5... Thank you in advance...

    解决方案

    Whenever I have a NuGet error such as these I usually take these steps:

    1. Go to the packages folder in the Windows Explorer and delete it.
    2. Open Visual Studio and Go to Tools > Library Package Manager > Package Manager Settings and under the Package Manager item on the left hand side there is a "Clear Package Cache" button. Click this button and make sure that the check box for "Allow NuGet to download missing packages during build" is checked.
    3. Clean the solution
    4. Then right click the solution in the Solution Explorer and enable NuGet Package Restore
    5. Build the solution

    Taking all of these steps almost always restores all the packages and dll's I need for my MVC program.


    EDIT >>>

    For Visual Studio 2013 and above, step 2) should read:

    1. Open Visual Studio and go to Tools > Options > NuGet Package Manager and on the right hand side there is a "Clear Package Cache button". Click this button and make sure that the check boxes for "Allow NuGet to download missing packages" and "Automatically check for missing packages during build in Visual Studio" are checked.

    这篇关于无法加载文件或程序集“System.Net.Http.Formatting”或它的一个依赖。该系统找不到指定的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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