【问题标题】:Using 4.7.2 Framework for WPF Project System.NET.HTTP Cannot Be Found使用 4.7.2 Framework for WPF 项目 System.NET.HTTP 找不到
【发布时间】:2018-11-28 06:10:39
【问题描述】:

我最初是使用 4.6.1 框架开发一个项目,但是我想要的其中一个 Nuget 包需要使用新的 4.7.2 框架。结果,我升级了我的项目,当它尝试再次运行并发送 HTTP 请求时给了我错误:

System.IO.FileNotFoundException: 'Could not load file or assembly 'System.Net.Http, 
Version=4.2.0.0, Culture=neutral, PublicKeyToken=**********' or one of its
dependencies. The system cannot find the file specified.'

我该如何解决这个问题? (如果我降级到 4.6.1 就可以了,而且我还尝试在使用 4.7.2 框架时卸载并重新安装 System.Net)

【问题讨论】:

  • 我做了,我提到我卸载了它,然后在升级时重新安装了它。
  • 您是否进行了清理和重建?
  • 是的,我也可以在参考文献中看到它。但是我仍然收到此错误
  • 可能是这个问题:github.com/dotnet/corefx/issues/29622

标签: c# .net wpf .net-4.7.2


【解决方案1】:

在 app.config 中更改:

<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />

<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1" />

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-02
    • 2022-01-08
    • 2019-07-06
    • 2015-04-19
    相关资源
    最近更新 更多