未能加载文件或程序集“System.ValueTuple, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。
一些老的项目在使用SAEA.Socket相关库后,程序本地测试正常,结果上传到服务器上后提示:未能加载文件或程序集“System.ValueTuple, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040),其实这个和是不是引用或缺少了System.ValueTuple无任何关系,主要原因就是项目比较老,下面仔细看看项目修改前的xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <PropertyGroup>
4 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6 <ProjectGuid>{78CE982E-88D7-4959-AB4E-69DDDC183B1B}</ProjectGuid>
7 <OutputType>Exe</OutputType>
8 <AppDesignerFolder>Properties</AppDesignerFolder>
9 <RootNamespace>test</RootNamespace>
10 <AssemblyName>test</AssemblyName>
11 <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
12 <FileAlignment>512</FileAlignment>
13 <TargetFrameworkProfile />
14 <PublishUrl>publish\</PublishUrl>
15 <Install>true</Install>
16 <InstallFrom>Disk</InstallFrom>
17 <UpdateEnabled>false</UpdateEnabled>
18 <UpdateMode>Foreground</UpdateMode>
19 <UpdateInterval>7</UpdateInterval>
20 <UpdateIntervalUnits>Days</UpdateIntervalUnits>
21 <UpdatePeriodically>false</UpdatePeriodically>
22 <UpdateRequired>false</UpdateRequired>
23 <MapFileExtensions>true</MapFileExtensions>
24 <ApplicationRevision>0</ApplicationRevision>
25 <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
26 <IsWebBootstrapper>false</IsWebBootstrapper>
27 <UseApplicationTrust>false</UseApplicationTrust>
28 <BootstrapperEnabled>true</BootstrapperEnabled>
29 </PropertyGroup>
30 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
31 <PlatformTarget>x64</PlatformTarget>
32 <DebugSymbols>true</DebugSymbols>
33 <DebugType>full</DebugType>
34 <Optimize>false</Optimize>
35 <OutputPath>bin\Debug\</OutputPath>
36 <DefineConstants>DEBUG;TRACE</DefineConstants>
37 <ErrorReport>prompt</ErrorReport>
38 <WarningLevel>4</WarningLevel>
39 <Prefer32Bit>false</Prefer32Bit>
40 <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
41 </PropertyGroup>
42 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
43 <PlatformTarget>x64</PlatformTarget>
44 <DebugType>pdbonly</DebugType>
45 <Optimize>true</Optimize>
46 <OutputPath>bin\Release\</OutputPath>
47 <DefineConstants>TRACE</DefineConstants>
48 <ErrorReport>prompt</ErrorReport>
49 <WarningLevel>4</WarningLevel>
50 <Prefer32Bit>false</Prefer32Bit>
51 <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
52 </PropertyGroup>
这个项目是vs2015创建的,虽然现在用vs2017或者vs2019打开可以本地运行,但是只要放服务器上就会报未能加载文件或程序集“System.ValueTuple, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。所以直接将项目改成vs2017建的格式再看看,xml如下:
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <PropertyGroup>
4 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6 <ProjectGuid>{78CE982E-88D7-4959-AB4E-69DDDC183B1B}</ProjectGuid>
7 <OutputType>Exe</OutputType>
8 <RootNamespace>test</RootNamespace>
9 <AssemblyName>test</AssemblyName>
10 <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
11 <FileAlignment>512</FileAlignment>
12 <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
13 <Deterministic>true</Deterministic>
14 </PropertyGroup>
15 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16 <PlatformTarget>AnyCPU</PlatformTarget>
17 <DebugSymbols>true</DebugSymbols>
18 <DebugType>full</DebugType>
19 <Optimize>false</Optimize>
20 <OutputPath>bin\Debug\</OutputPath>
21 <DefineConstants>DEBUG;TRACE</DefineConstants>
22 <ErrorReport>prompt</ErrorReport>
23 <WarningLevel>4</WarningLevel>
24 </PropertyGroup>
25 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26 <PlatformTarget>x64</PlatformTarget>
27 <DebugType>pdbonly</DebugType>
28 <Optimize>true</Optimize>
29 <OutputPath>bin\Release\</OutputPath>
30 <DefineConstants>TRACE</DefineConstants>
31 <ErrorReport>prompt</ErrorReport>
32 <WarningLevel>4</WarningLevel>
33 <Prefer32Bit>false</Prefer32Bit>
34 </PropertyGroup>
对比差别:

将左侧的改为右侧的配置,上述异常消失!
未能加载文件或程序集“System.ValueTuple, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。的更多相关文章
- 未能加载文件或程序集“Spire.Pdf, Version=4.8.8.2020, Culture=neutral, PublicKeyToken=663f351905198cb3”或它的某一个依赖项。未能授予最小权限请求
问题:运行程序执行到代码报错:未能加载文件或程序集“Spire.Pdf, Version=4.8.8.2020, Culture=neutral, PublicKeyToken=663f3519051 ...
- 其他信息: 未能加载文件或程序集“WebGrease, Version=1.5.1.25624, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一个依赖项。找 到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)
记录一下,发布web时遇到的一些问题. 一.报错信息: 其他信息: 未能加载文件或程序集“WebGrease, Version=1.5.1.25624, Culture=neutral, Public ...
- 报错:未能加载文件或程序集“WebGrease, Version=1.5.1.25624, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)
□ 背景 通过NuGet安装某程序包后,运行程序出现如上错误. □ 分析 可能是程序集版本不兼容引起的,可以通过NuGet先把程序包删除,然后再安装最新或某个版本的程序包. □ 解决方法 通过 ...
- 未能加载文件或程序集“System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一个依赖项。系统找不到指定的文件
ASP.NET 运行时错误:针对类型System.Web.Mvc.PreApplicationStartCode的应用程序邓启动初始化方法Start 引发了异常,显示下列错误消息: 未能加载文件或程序 ...
- System.BadImageFormatException : 未能加载文件或程序集“Medici.PaymentRecover, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null”或它的某一个依赖项。试图加载格式不正确的程序。
System.BadImageFormatException : 未能加载文件或程序集“xxxxx.xxxxx, Version=1.0.0.0, Culture=neutral, PublicKey ...
- 未能加载文件或程序集"System.Data,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089"或它的某一个依赖项。系统找不到指定的文件。
sqlserver 2005打开出现无法正常访问数据,提示信息: 未能加载文件或程序集"System.Data,Version=2.0.0.0,Culture=neutral,PublicK ...
- 分析器错误消息: 未能加载文件或程序集“System.WEB.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一个依赖项。系统找不到指定的文件。
分析器错误消息: 未能加载文件或程序集“System.WEB.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=3 ...
- 创建 userSettings/Microsoft.SqlServer.Configuration.LandingPage.Properties.Settings 的配置节处理程序时出错: 未能加载文件或程序集“System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”或它的某一个依赖项。系统没找到指定的文件
创建 userSettings/Microsoft.SqlServer.Configuration.LandingPage.Properties.Settings 的配置节处理程序时出错: 未能加载文 ...
- “System.BadImageFormatException”类型的未经处理的异常在 PurchaseDevices.Access.dll 中发生 其他信息: 未能加载文件或程序集“System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139”或它的某一个依赖项。试图加载格式不正确
引用sqlite的程序集时,有时会报如下异常: "System.BadImageFormatException"类型的未经处理的异常在 PurchaseDevices.Acces ...
- 未能加载文件或程序集“System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一个依赖项
在发布网站时遇到如题错误. 错误消息详细信息:未能加载文件或程序集“System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=3 ...
随机推荐
- Djagno 使用locals()
Django使用locals()函数 locals()函数会以字典类型返回当前位置的全部局部变量 在 views.py中添加 #展示 class Goods_list(View): def get(s ...
- Python办公自动化_Excel篇
Python办公自动化_Excel篇 库名 作用 xlrd 从excel中读取数据,支持xls,xlsx xlwt 从excel进行修改操作,不支持对xlsx格式的修改 xlutils 在xlrd和x ...
- Python网络编程:ZeroMQ
大家好,我是老胡.最近在和小伙伴们一起搞事情,我是学统计出身,编程能力其实很差,有点拖后腿了.所以需要恶补基础,这个系列会更新几篇,感兴趣的同学可以一起学习交流. ZeroMQ概述 ZeroMQ(又名 ...
- 【django-vue】前后端分离项目
博客目录 pip永久换源 虚拟环境搭建 项目前后端创建 项目目录调整 封装logger 封装全局异常 封装response 数据库配置 用户表继承AbstractUser配置 开放media访问 路飞 ...
- Spring Boot Serverless 实战系列“部署篇” | Mall 应用
导读:SpringBoot 是基于 Java Spring 框架的套件,它预装了 Spring 的一系列组件,让开发者只需要很少的配置就可以创建独立运行的应用程序.在云原生的世界里,有大量的平台可以运 ...
- Power Designer建模之餐饮在线点评系统——概念数据模型
企业信息管理 局部概念模型 企业 餐饮企业 食材提供商 食材 特色菜 团购活动 优惠券 促销活动 会员团购订单 优惠券下载和浏览记录表 会员信息管理 局部概念模型 会员 会员扩展信息 会员积分记录 餐 ...
- Python数据可视化-动态柱状图可视化
Python数据可视化-动态柱状图可视化 一.基础柱状图 通过Bar构建基础柱状图 """ 演示基础柱状图的开发 """ from pyec ...
- KVM 核心功能:CPU 虚拟化
1 vCPU 简介 CPU 负责计算机程序指令的执行.QEMU-KVM 提供对虚拟机 CPU 的模拟,对于虚拟机来说,其拥有的 CPU 是真实的, 和物理 CPU 没有区别. 实际上,虚拟机在 hos ...
- apache mina
本文为博主原创,未经允许不得转载: Apache Mina(Apache Multipurpose Infrastructure for Network Applications)是一个基于Java的 ...
- Spring cloud gateWay 限流器限流(一)
转载请注明出处: spring cloud 提供了限流操作的功能,其使用步骤如下: 1.引入maven依赖: <dependency> <groupId>org.springf ...