Unable to use iTextSharp with ASP.NET 5 Core

人盡茶涼 提交于 2019-12-05 11:15:57

Most existing packages will not support asp.net Core 5 yet; because of the significant differences, they need to be manually updated. If you're wanting to use iTextSharp, you'll either need to stick to asp.net 5 (not Core) or wait for the creators of iTextSharp to release a Core version.

For now rather than wait for a package update a work around for this is simply including the Asp.net 4.6 framework and list itextsharp as one of the depenencies.

Packages.json

"frameworks": {
    "netcoreapp1.0": {
      "dependencies": {
        "Microsoft.NETCore.App": {
          "version": "1.0.1",
          "type": "platform"
        }
      },
      "imports": [
        "dotnet5.6",
        "portable-net45+win8"
      ]
    },
    "net461": {
      "dependencies": {
         "iTextSharp": "5.5.10"
      }
    }
  },
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!