PDFLibNet第三方库中我在.net framework2中可以运行,我把它放到.net framework中就出现错误:
混合模式程序集是针对“v2.0.50727”版的运行时生成的,在没有配置其他信息的情况下,无法在 4.0 运行时中加载该程序集
怎么才能让它可以再.net framework中也可以运行啊!C#.netPDFLibNet
混合模式程序集是针对“v2.0.50727”版的运行时生成的,在没有配置其他信息的情况下,无法在 4.0 运行时中加载该程序集
怎么才能让它可以再.net framework中也可以运行啊!C#.netPDFLibNet
解决方案 »
- 史上最牛逼验证码,对验证码有研究的过来,保准你们破不了。
- 怎样在PICTUREBOX中用鼠标拖动图片?我PICTUREBOS是fill整个formd的
- 无聊的小问题
- 我想跟大家共享我200分的PUDN帐号,仅限前10个回贴的,但如果.......
- 梅花雨控件的默认年份
- (100 分求)c# 把 excel 和 文本文档 中数据 导入到 DataGridView 不是把 excel 或 文本文档作为数据源 而是把其中数据导入到 datagridvie
- 请推荐设计模式写得比较好的C#源吗
- C# word标签内容中如何将第一个单词加粗
- gof模式。谁有这方面的照料。。。(UP的有分)
- DataGrid问题(再现等候)
- 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!");
}