The type exists in both

Hello guys,

I have a issue that is error CS0433: The type ‘SignedXml’ exists in both ‘System.Security.Cryptography.Xml, Version=[], Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’ and ‘[System.Security], Version=[], Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’

Variable type System.Security.Cryptography.Xml.SignedXml in System.Security package does not have some function I need so I have to install System.Security.Cryptography.Xml package.

I have deleted System.Security package directly from Main.xaml but it doesn’t work.

Do you guys have any solution for that problem?


Use full namespace instead of the method

Liek this


I did it mate, but it have not solved the problem because the package includes System.Security.Cryptography.Xml.SignedXml with full namespace too. I have checked it in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.X


So you are getting this error when compiling? or on any specific activity?


I got it in Invoke Code C# activity mate


Can you show what you are doing…Because in invoke code instead of using signedxml if you use fully qualified name it should resolve ideally


sorry mate I can’t, but i’m sure that every variable declaration will be full namespace. And the problem is in security package also has full namespace variable type System.Security.Cryptography.Xml.SignedXml


Pardon …I dint think it was on variable…I was thinking you were declaring inside the code

Check imports and try removing the dependency might help


In fact imports in my workflow doesn’t have namespace I think this package is default by UiPath