zoukankan      html  css  js  c++  java
  • Could not load file or assembly 'System.ValueTuple'

    项目目标框架:.Net Framework 4.6.2
    报错:Could not load file or assembly 'System.ValueTuple'
    在4.6.2项目中,想要使用C#7.0新特性ValueTuple,需要添加nuget引用System.ValueTuple。
    项目一开始引用的是最早的版本4.3.0的System.ValueTuple,使用正常。
    前几天更新成了当前最新稳定版4.5.0,发布项目,返回报错信息:Could not load file or assembly 'System.ValueTuple, Version=4.0.3.0, Culture=neutral

    在Stack Overflow找到同类问题,Could not load file or assembly 'System.ValueTuple'

    Stack Overflow给出的解决方案有多种:
    第一种:System.ValueTuple nuget降级回4.3.0
    第二种:修改配置文件,指定版本

    我尝试了第一种方案,未能解决。
    尝试第二种解决方案,项目运行完好,报错解决。

     <dependentAssembly>
            <assemblyIdentity name="System.ValueTuple" culture="neutral" publicKeyToken="cc7b13ffcd2ddd51" />
            <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
          </dependentAssembly>
    
  • 相关阅读:
    background-clip与background-origin
    jquery判断一个元素是否为某元素的子元素
    Math.pow()实现开任意次方根
    vue基础点
    css3
    css系统学习
    angularJs
    jquery与JavaScript
    bootstrapt使用
    bootstrap
  • 原文地址:https://www.cnblogs.com/AlienXu/p/9323657.html
Copyright © 2011-2022 走看看