项目目标框架:.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>

Could not load file or assembly 'System.ValueTuple'的更多相关文章

  1. Could not load file or assembly 'System.ServiceModel.DomainServices.Hosting'.系统找不到指定文件

    项目部署到服务器后出现如下错误信息: Parser Error Message: Could not load file or assembly 'System.ServiceModel.Domain ...

  2. Could not load file or assembly 'System.Data.SQLite' or one of its dependencies

    试图加载格式不正确的程 异常类型 异常消息Could not load file or assembly 'System.Data.SQLite' or one of its dependencies ...

  3. [转]Could not load file or assembly 'System.Core, Version=2.0.5.0 和autofac冲突的问题

    Could not load file or assembly 'System.Core, Version=2.0.5.0 和autofac冲突的问题 来源:http://www.cnblogs.co ...

  4. Could not load file or assembly 'System.Core, Version=2.0.5.0 和autofac冲突的问题

    在部署到iis的时候会出现这个状况. 解决:下载安装这个补丁 http://support.microsoft.com/kb/2468871 http://www.microsoft.com/zh-c ...

  5. SQLite 解决:Could not load file or assembly 'System.Data.SQLite ... 试图加载格式不正确的程序/or one of its dependencies. 找不到指定的模块。

     Could not load file or assembly 'System.Data.SQLite.dll' or one of its dependencies. 找不到指定的模块. 错误提示 ...

  6. ASP.NET MV3 部署网站 报"Could not load file or assembly ' System.Web.Helpers “ 错的解决方法

    转自:http://www.cnblogs.com/taven/archive/2011/08/14/2138077.html 国内很多网站空间都只支持.NET 2.0 和 .NET 3.0 3.5, ...

  7. Could not load file or assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

    提示哪个引用修改哪个引用的属性: Could not load file or assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, ...

  8. Could not load file or assembly 'System.Web.Mvc, Version=5.2.3.0...

    一.在Mvc 发布时出现如下错误: Could not load file or assembly 'System.Web.Mvc, Version=5.2.3.0... 出现错误的原因是 Mvc版本 ...

  9. Could not load file or assembly 'System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not mat

    Could not load file or assembly 'System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b ...

随机推荐

  1. RSA算法加解密

    package org.thcic.ejw.util.encrypt; import java.io.ByteArrayOutputStream; import java.security.Key; ...

  2. python爬虫第五天

            cookie           我们访问网页是通过http协议进行的,而http协议是一个无状态协议(无法维持会话之间的状态),比如我们登录一个网站成功后访问另一个网页,那么登录状态 ...

  3. [error] - Build path is incomplete. Cannot find class file for org/aspectj/weaver/refl

    将本地仓库中mybatis 的jar 包删除,然后在eclipse 中右键工程选中 Maven->upgrade ..

  4. 麒麟子Cocos Creator实用技巧

    大家好,我是麒麟子, 开源棋牌<幼麟棋牌-四川麻将>(泄漏版叫 <达达麻将>)作者,成都幼麟科技创始人. 自09年进入游戏行业以来,不知不觉已经度过了十个春秋. 曾经我也血气方 ...

  5. Vue 单文件元件 — vTabs

    简书原文 这是我做了第二个单文件元件 第一个在这里vCheckBox 这次这个叫vTabs,用于操作标签页 演示DEMO 演示DEMO2 - 子组件模式及别名 演示DEMO3 - 极简模式 示例: h ...

  6. vux 项目的构建

    一:vux安装 # 安装vuxcnpm install vux --save   # 安装vux-loadercnpm install vux-loader --save-dev   # 安装less ...

  7. 【面试篇】资深招聘HR有哪些面试技巧?

    15年资深招聘HR总结的面试技巧     1.做一下自我介绍 了解应聘者的基本信息和工作经历 2.以往工作中您的职责是什么? 了解应聘者的相关工作经验和其系统性全面性 3.请讲一下您以往的工作经历. ...

  8. [Swift]LeetCode240. 搜索二维矩阵 II | Search a 2D Matrix II

    Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the follo ...

  9. Redis 设计与实现 (五)--多机数据库的实现

    多机数据库的实现 一.复制 slaveof  主服务器ip地址.形成主从关系. 1.同步  从向主服务器发送sync命令.  主服务器收到sync命令执行bgsave,生成rdb文件,缓冲区同时记录从 ...

  10. C++ 断言

    assert宏 (基本概念与用法整理) assert宏的深入学习 1.运行时断言 1.1.assert属于运行时断言,可以在运行时判断给定条件是否为真,如果为真则什么也不做,否则打印一跳错误信息,然后 ...