Skip to content

Conversation

@bartonjs
Copy link
Member

Fixes #78652.

Manually verified that the net462/ref.dll and net462/lib.dll were missing the typefowards before, and they're present after.

@ghost ghost added the area-System.Security label Nov 21, 2022
@ghost ghost assigned bartonjs Nov 21, 2022
@ghost
Copy link

ghost commented Nov 21, 2022

Tagging subscribers to this area: @dotnet/area-system-security, @vcsjones
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #78652.

Manually verified that the net462/ref.dll and net462/lib.dll were missing the typefowards before, and they're present after.

Author: bartonjs
Assignees: -
Labels:

area-System.Security

Milestone: -

Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change LGTM, but there is one more project file that has the same bug:

<Compile Include="System.Threading.AccessControl.netframework.cs" Condition="'$(TargetFrameworkIdentifier)' == 'NETFramework'" />

@bartonjs would you mind fixing it in this PR as well?

@carlossanlop
Copy link
Contributor

@ViktorHofer is there a way to be notified via a build failure when there's a typo like this?

Copy link
Member

@ViktorHofer ViktorHofer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this, @bartonjs

@ViktorHofer
Copy link
Member

APICompat doesn't catch this because the type forwards don't exist on netstandard2.0. Baseline validation that compares ref/net462 or lib/net462 from the previous package with the live built one could theoretically catch this. That said, we don't have such a feature in ApiCompat today.

I'm a bit surprised that our .NET Framework tests didn't catch this. It looks like the tests don't bind against the package asset and instead directly on the .NET Framework runtime library. That alone is a terrible indicator that we might not be testing our actually .NET Framework shipping assets and that would raise the question why we then even run those tests.

@bartonjs
Copy link
Member Author

that would raise the question why we then even run those tests.

For cryptoxml, to ensure that any changes we do take are still compatible with netfx, because it's effectively a serialization library and needs that level of fidelity.

But, yes, it would be better if the tests (or APICompat/etc) could guard us from this, too.

@bartonjs bartonjs merged commit 3d4f512 into dotnet:main Nov 22, 2022
@bartonjs
Copy link
Member Author

/backport to release/7.0

@github-actions
Copy link
Contributor

Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3527528268

@bartonjs bartonjs deleted the fix_crypto_xml_netfx branch November 22, 2022 22:20
@ghost ghost locked as resolved and limited conversation to collaborators Dec 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeLoadException in System.Security.Cryptography.Xml v7.0.0.0 for EncryptedData in .NET 4.8 project referencing .NET Standard 2.0 library

4 participants