I have a c# program that uses BouncyCastle. If I insert a reference to iTextSharp, the compiler generates many errors of classes already existing in both references. I have specified all the namespaces but it does not change anything. Example:
Org.BouncyCastle.X509.X509Certificate certCopy = DotNetUtilities.FromX509Certificate(oCertificato);
How can I use BouncyCastle and iTextSharp together?
Just like @franco-de-giorgi said. Add an Alias to the library.
I'm just writing a full answer because I had to learn what is an Alias and how to add and Alias
Go to your references and go to properties on BouncyCastle, then change global to your personal Alias:
Then in your class use an external alias to your references like this (instead of using)
//using Org.BouncyCastle.Crypto.Parameters;
extern alias Merged;
In your classes add your alias
new Merged::Org.BouncyCastle.OpenSsl.PemReader
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With