Skip to content
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

Flow live version of System.Security.Permissions for source-build #9158

Merged
merged 1 commit into from Aug 25, 2023

Conversation

mthalman
Copy link
Member

@mthalman mthalman commented Aug 23, 2023

When .NET is source-built with the mono runtime, there can be scenarios where MSBuild is made to attempt to load a reference assembly for System.Security.Permissions. See dotnet/source-build#3571 (comment) for such a scenario.

The reason a reference assembly exists in this case is because MSBuild has a reference to the 7.0.0 version of System.Security.Permissions. When building with source-build, it loads that reference from SBRP (which only contains reference assemblies) in order to fulfill compile time references. The problem is that the assembly is also getting included in the output. This should have been detected by poison leak detection but that doesn't yet handle reference assemblies.

The solution is to update Version.Details so that the "live" version of System.Security.Permissions, that was previously built with source-build, will flow to the build of the MSBuild repo. Essentially, this causes the SystemSecurityPermissionsVersion property to be overridden with the live version.

Fixes dotnet/source-build#3571

@JaynieBai JaynieBai merged commit be26b4c into dotnet:main Aug 25, 2023
8 checks passed
@mthalman mthalman deleted the permissions branch August 25, 2023 13:38
@mthalman
Copy link
Member Author

This also resolved an issue with System.Windows.Extensions showing up as a reference assembly as described in dotnet/source-build#3599. This is because System.Windows.Extensions is a dependency of System.Security.Permissions.

rainersigwald pushed a commit that referenced this pull request Aug 28, 2023
This fixes a portion of the assemblies described in dotnet/source-build#3599 that are showing up as reference assemblies in the source-built SDK. The reason they're showing up as ref assemblies is the same reason that's described in #9158, which is a related issue.

It's not known whether the existence of these ref assemblies causes a functional issue as it does with #9158. But we do know that the source-built 7.0 SDK doesn't define these as ref assemblies but rather implementation assemblies. So to maintain parity with 7.0 and avoid potential risk, it's best to ensure these are represented as implementation assemblies in the output.

These are the assemblies that are fixed by these changes:

* System.CodeDom
* System.Resources.Extensions
* System.Security.Cryptography.Xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

On ppc64le, VMR at 8 Preview 6 doesn't build using itself
4 participants