NET无法运行“IronPdf”nuget包

时间:2015-12-06 02:40:49

标签: c# .net nuget

我试图在我的NET MVC 4.5上使用IronPdf包,但每次我开始调试我的应用程序时,都会出现错误并显示此消息:

“无法加载文件或程序集'IronPdft'或其依赖项之一。系统找不到文件....”等等。

我尝试了这个dll的不同版本,还使用了Nuget控制台和手动安装。 任何线索都将受到高度赞赏。

这里我发布了我的web.config主结构

<configuration>

<configSections>
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> 
    <system.web>
        <compilation targetFramework="4.5" debug="true" />
        <httpRuntime targetFramework="4.5" />
        <customErrors mode="Off" />
        <globalization enableClientBasedCulture="false" uiCulture="es-AR" culture="es-AR" />
    </system.web>
    <system.webServer>
        <handlers>
            <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
            <remove name="OPTIONSVerbHandler" />
            <remove name="TRACEVerbHandler" />
            <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
        </handlers>
        <directoryBrowse enabled="false" />
        <modules runAllManagedModulesForAllRequests="true">
            <remove name="BundleModule" />
            <add name="BundleModule" type="System.Web.Optimization.BundleModule" />
        </modules>
    </system.webServer>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
                <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
                <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
                <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
                <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
                <bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
            </dependentAssembly>
        </assemblyBinding>
    </runtime>
    <runtime>
        <bypassTrustedAppStrongNames enabled="false" />
    </runtime>
</configuration>

1 个答案:

答案 0 :(得分:1)

我通过切换到Select.Pdf包解决了这个问题,它提供了我需要的相同功能。