Mukesh Kumar
Mukesh Kumar

Reputation: 53

Upgrade iTextsharp 5.5.4 to 5.5.7 in c#

i am using itextsharp 5.5.4 in c# application and due to some complications in pdf, i want to upgrade to 5.5.7.

My question is, can i replace the existing version with new one or i need to rebuild the application with latest dll.

Thanks in advance.

Upvotes: 2

Views: 1151

Answers (3)

Paulo Soares
Paulo Soares

Reputation: 1916

You can't replace it directly (maybe you can, see below), you'll have to recompile your application. The API is the same, you won't have problems there.

Another option is using <assemblyBinding> in a config file to trick the app into accepting an assembly with a different version. See https://msdn.microsoft.com/en-us/library/twy1dw1e%28v=vs.110%29.aspx.

Upvotes: 0

kamil-mrzyglod
kamil-mrzyglod

Reputation: 5008

I would say - it depends.

You cannot know whether library is compatible backwards. Some metadata can be embedded into your DLL which will change with new version.

What is more, you can have specific version bindings, what can break your app with the new iTextSharp version.

If library is installed in GAC, that would require new version installation.

Upvotes: 1

Cameron Tinker
Cameron Tinker

Reputation: 9789

Depending on whether you used NuGet or referenced the DLL directly, you should be able to do an in-place upgrade unless the API has changed significantly. I would recommend NuGet for managing dependencies and upgrades but if you have a direct reference you can just update the reference to the new version.

Upvotes: 1

Related Questions