首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >PDFSharp程序集清单定义

PDFSharp程序集清单定义
EN

Stack Overflow用户
提问于 2017-11-07 14:15:44
回答 1查看 1.9K关注 0票数 1

我从Nuget Manager安装了PDFSharp/MigraDoc,并尝试使用它。当我尝试编写PDF时,它会给出以下错误:

无法加载文件或程序集“PdfSharp、Version=1.32.3057.0、Culture=neutral、PublicKeyToken=f94615aa0424f9eb”或其依赖项之一。所定位的程序集的清单定义与程序集引用不匹配。(HRESULT例外: 0x80131040)

它给了我一个程序集负载跟踪,如下所示:

代码语言:javascript
复制
=== Pre-bind state information ===
LOG: DisplayName = PdfSharp, Version=1.32.3057.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb
 (Fully-specified)
LOG: Appbase = file:///C:/Users/jh/Documents/GitHub/Base1.5/Website/
LOG: Initial PrivatePath = C:\Users\jh\Documents\GitHub\Base1.5\Website\bin
Calling assembly : MigraDoc.Rendering, Version=1.32.4334.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\jhop\Documents\GitHub\Base1.5\Website\web.config
LOG: Using host configuration file: C:\Users\jhop\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: PdfSharp, Version=1.32.3057.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb
LOG: Attempting download of new URL file:///C:/Users/jh/AppData/Local/Temp/Temporary ASP.NET Files/vs/81f4fd95/d5ff50bc/PdfSharp.DLL.
LOG: Attempting download of new URL file:///C:/Users/jh/AppData/Local/Temp/Temporary ASP.NET Files/vs/81f4fd95/d5ff50bc/PdfSharp/PdfSharp.DLL.
LOG: Attempting download of new URL file:///C:/Users/jh/Documents/GitHub/Base1.5/Website/bin/PdfSharp.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

我能做些什么来解决这个问题?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-11-07 14:33:14

请注意,MigraDoc包包括PDFsharp,因此不要将PDFsharp和MigraDoc作为单独的包安装于NuGet。

不同的版本号1.32.4334和1.32.3057表明您安装了不同且不兼容的NuGet包,或者可能引用了根本不来自NuGet的程序集。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47160116

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档