You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RSACertificateExtensions.GetRSAPrivateKey() fails on UWP #17257
Since 4.2.0-rc3-24105-00, in UWP, calling RSACertificateExtensions.GetRSAPrivateKey() results in:
System.TypeLoadException occurred
Message=Could not load type 'System.Security.Cryptography.ECDsa' from assembly 'System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Source=System.Security.Cryptography.X509Certificates
I see in the package that the runtime changed from netstandard1.4 to 1.6.
I found in ".nuget\packages\System.Security.Cryptography.Algorithms\4.2.0-rc3-24111-00\ref\netstandard1.4"
"System.Security.Cryptography.Algorithms.dll" has the ECDsa type.
So it compiles.
But there is no "\lib\netstandard1.4" or "\runtimes\win\lib\netstandard1.4" so it fails at runtime.
So netstandard1.4 isn't a runnable TFM. It's an abstract/portable TFM that represents the surface area of many app models / concrete TFMs. The concrete TFM here you'd be using would be from the UWP application referencing this, which should use
"frameworks": {
"uap10.0": {}
},
Here is an example of a project that works fine for me with UWP and the latest Algorithms:
Okay, after chatting with Eric some more we figured it out. The ECDsa class got excluded from the netcore50 library during a recent change; and so that's causing this error. I've reproed it locally with Eric's project.json and my test app.
Activity
bartonjs commentedon May 12, 2016
Could you share your whole project.json so I can try to get into the same state?
awcullen commentedon May 12, 2016
My library that is calling GetRSAPrivateKey has
awcullen commentedon May 12, 2016
I found in ".nuget\packages\System.Security.Cryptography.Algorithms\4.2.0-rc3-24111-00\ref\netstandard1.4"
"System.Security.Cryptography.Algorithms.dll" has the ECDsa type.
So it compiles.
But there is no "\lib\netstandard1.4" or "\runtimes\win\lib\netstandard1.4" so it fails at runtime.
Thanks
ericstj commentedon May 12, 2016
So
netstandard1.4isn't a runnable TFM. It's an abstract/portable TFM that represents the surface area of many app models / concrete TFMs. The concrete TFM here you'd be using would be from the UWP application referencing this, which should useHere is an example of a project that works fine for me with UWP and the latest Algorithms:
bartonjs commentedon May 12, 2016
Okay, after chatting with Eric some more we figured it out. The ECDsa class got excluded from the netcore50 library during a recent change; and so that's causing this error. I've reproed it locally with Eric's project.json and my test app.
awcullen commentedon May 12, 2016
Awesome. Thanks guys.
bartonjs commentedon May 13, 2016
@awcullen It looks happy to me with the 24113 packages, mind giving it a go?
awcullen commentedon May 13, 2016
Good to go. Thanks again.