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=[7.0.0.0], Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’ and ‘[System.Security], Version=[4.0.0.0], 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?

@noob_dev

Use full namespace instead of the method

Liek this system.security.signedxml

Cheers

I did it mate, but it have not solved the problem because the system.security 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

@noob_dev

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

cheers

I got it in Invoke Code C# activity mate

@noob_dev

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

cheers

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

@noob_dev

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

cheers

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