gmanny / Pechkin

.NET Wrapper for WkHtmlToPdf static DLL. Allows you to utilize full power of the library.
401 stars 128 forks source link

Runs fine in Windows7 Home basic, but fails to find dependencies on Windows Xp SP2 #68

Closed vmakwana closed 10 years ago

vmakwana commented 10 years ago

What dependencies are to be installed before using Pechkin?

e.g. any VC++/VC runtimes ?

For me it works very well on Windows 7 but running it on Windows Xp fails to find dependencies.

Any help appreciated.

Update: found out that it fails to load Common.Logging.dll assembly. Error: Could not load file or assembly 'Common.Logging, Version=2.1.1.0, Culture=neutral, PublicKeyToken=af08829b84f0328e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Stacktrace: at Pechkin.GlobalConfig.SetPaperSize(PaperKind kind)

Further Update: removing SetPaperSize(PaperKind kind), got following error: The type initializer for 'Pechkin.Synchronized.SynchronizedPechkin' threw an exception. Stacktrace: at Pechkin.Synchronized.SynchronizedPechkin..ctor(GlobalConfig config)

vmakwana commented 10 years ago

Adding this in app exe config solved the issue: configuration> runtime> assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> dependentAssembly> assemblyIdentity name="Common.Logging" publicKeyToken="af08829b84f0328e" culture="neutral"/> bindingRedirect oldVersion="0.0.0.0-2.1.2.0" newVersion="2.1.2.0"/> /dependentAssembly> /assemblyBinding> /runtime> /configuration>