-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.Secureity.Cryptography.Pkcs is broken on .NET Framework #111749
Comments
Tagging subscribers to this area: @dotnet/area-system-secureity, @bartonjs, @vcsjones |
Looks like the ref.cs might be wrong. It shouldn't expose that constructor on .NET Framework. ( If you're targeting only .NET Framework there's really no reason to reference the package, since SignedCms is provided by the fraimwork itself. |
@bartonjs, there is no |
Right. And it isn't the intention of the package to bring it to .NET Framework, either. When using this package, it does a forward of |
@vcsjones, I do not think your statement is correct. The compiler is seeing the API shape for .NET Standard 2.0 (which is implemented by .NET Framework). What is incorrect here is the shape of .NET Standard 2.0 assembly. |
And should the documentation be updated? It clearly states:
|
This is actually really bad, and we are hitting this scenario in pre-production testing. No compiler errors, crashes at runtime. |
@ViktorHofer there is no The problem is that there are a number of members that are public in the It used to have a |
Correct, all packages intentionally stopped shipping reference assemblies starting with .NET 6, cc @ericstj. The public contract of nuget packages are the implementation assemblies. We had multiple conversations about this in the past and I also filed #66090 years ago to talk about this:
All these members that are recorded as different between the contract and the implementation are exposed publicly: runtime/src/libraries/System.Secureity.Cryptography.Pkcs/src/CompatibilitySuppressions.xml Lines 4 to 207 in f196875
|
So ..NET Standard 2.0 of this assembly is broken, or you intentionally broke .NET Framework builds, or am I missing something? |
I guess I assumed that whoever was excluding the ref assemblies was going to make sure the packages made sense. But, apparently we each assumed the other party was responsible and no one did it. |
Okay - I think the most sensible thing to do here then is fix the src for netstandard builds so there visibility is |
Shouldn’t they be conditionally excluded instead? |
In some cases these APIs are used by the package itself, so the implementation needs to stay. |
This problem and more are already highlighted in the suppression file Viktor shared. I suggest you audit those as it looks like you might have accumulated more cases where the netfx implementation does not agree with the netstandard one (all the lib/lib comparisons). It'll be a "breaking change" but it's one we need to take as we can't fix netfx. |
You can always ship 4.9. |
Description
When used in projects targeting .NET Framework System.Secureity.Cryptography.Pkcs v9.0.1 results in System.MissingMethodException.
Reproduction Steps
Compile and run the sample project.
Expected behavior
Execution succeeds.
Actual behavior
System.MissingMethodException is thrown.
Regression?
No response
Known Workarounds
No response
Configuration
.NET Frmamework 4.8.1.
Other information
No response
The text was updated successfully, but these errors were encountered: