.NET SDK Private Key Error but successfully signing through CLI

We are encountering an issue with the SDK when signing an XML file. Using the .net SDK ( v3.3.5) , the XML is signed and validated successfully through simulation CLI. However, when we attempt to sign the same XML using the C# SDK with .NET 4.8, we encounter the following error when we invoke the function “signer.SignDocument(xmlDoc, certificate, privateKey);”:
im using the private key which is generated along with CSR. and i copy paste in the destination “ec-secp256k1-priv-key.pem” accordingly mentioned in guidelines.

Problem creating EC private key: System.NullReferenceException: Object reference not set to an instance of an object.

at Org.BouncyCastle.Security.PrivateKeyFactory.CreateKey(PrivateKeyInfo keyInfo) in /_/crypto/src/security/PrivateKeyFactory.cs:line 110

at Org.BouncyCastle.OpenSsl.PemReader.ReadPrivateKey(PemObject pemObject) in /_/crypto/src/openssl/PEMReader.cs:line 321

code :

Could you please provide assistance or guidance on how to resolve this issue?

We appreciate your support and look forward to your response.

Hello, I have the same problem
Is there any solution??
help me,
Thanks,

I’m also facing the same issue… problem creating EC private key: System.ArgumentException: failed to construct sequence from byte: unknown tag 13 encountered\r\n at Org.BouncyCastle.Asn1.Asn1Sequence.GetInstance(Object obj) in //crypto/src/asn1/Asn1Sequence.cs:line 41\r\n at Org.BouncyCastle.OpenSsl.PemReader.ReadPrivateKey(PemObject pemObject) in //crypto/src/openssl/PEMReader.cs:line 271

@tufail129 , did you get any solution for this ?