PDFLibNet第三方库中我在.net framework2中可以运行,我把它放到.net framework中就出现错误:
混合模式程序集是针对“v2.0.50727”版的运行时生成的,在没有配置其他信息的情况下,无法在 4.0 运行时中加载该程序集
怎么才能让它可以再.net framework中也可以运行啊!C#.netPDFLibNet
混合模式程序集是针对“v2.0.50727”版的运行时生成的,在没有配置其他信息的情况下,无法在 4.0 运行时中加载该程序集
怎么才能让它可以再.net framework中也可以运行啊!C#.netPDFLibNet
解决方案 »
- WCF 更新服务引用报错
- c# 修改注册表项:SYSTEM\CurrentControlSet\Enum\usb 项 问题
- 转到定义时出现“无法导航到--”的对话框
- 按自已的思路乱写了一个伪url方法请高人给指点一下
- 高手进来 怎样让程序不显示在ALT+TAB的列表中
- 关于AppDomain的问题
- c# 利用API setscrollinfo函数控制richtextbox的滚动条,遇到了困难!
- wince 对SQLServer2000操作问题
- 在DataGrid中动态添加的DropDownList的SelectedIndexChanged事件的非常奇怪的问题(己搜索,但没找到答案)
- 介绍几本学习C#的好书
- C#WIndouws服务~~
- Dll注册问题
去找找新版本的。
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku = ".NETFramework,Version=v4.0"/>
<supportedRuntime version="v2.0.50727"/>
</startup>
</configuration>
方法实现中引用的声明不能是 final 方法。类型:“PDFLibNet.xPDFBinaryReader”,程序集:“PDFLibNet, Version=1.0.6.6, Culture=neutral, PublicKeyToken=26d87f7d66fb2aee”。这个是什么原因啊!
//下载 itextSharp.dll
//下载地址 http://sourceforge.net/projects/itextsharp/
using iTextSharp.text;
using iTextSharp.text.pdf;
using System.IO;
private void btnExport_Click(object sender, EventArgs e)
{
Document doc = new Document(iTextSharp.text.PageSize.LETTER, 10, 10, 42, 35);
PdfWriter wri = PdfWriter.GetInstance(doc, new FileStream("d:\\Test.pdf", FileMode.Create));
doc.Open();//Open Document to write
Paragraph paragraph = new Paragraph("data Exported From DataGridview!");
doc.Add(paragraph);
doc.Add(t1);
doc.Close(); //Close document
//
MessageBox.Show("PDF Created!");
}