Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Fix up the set of Windows compatibility libraries exposed in WindowsDesktop - #7324

Closed
dagood wants to merge 4 commits into
dotnet:masterfrom
dagood:fix-wd-exposure
Closed

Fix up the set of Windows compatibility libraries exposed in WindowsDesktop#7324
dagood wants to merge 4 commits into
dotnet:masterfrom
dagood:fix-wd-exposure

Conversation

@dagood

@dagood dagood commented Jul 22, 2019

Copy link
Copy Markdown
Member

@dagood
dagood requested review from MichaelSimons and ericstj July 22, 2019 20:36
@dagood dagood self-assigned this Jul 22, 2019

@MichaelSimons MichaelSimons left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have no insight on the System.IO.Pipes.AcessControl version assumption.

@dagood
dagood force-pushed the fix-wd-exposure branch from 5cafad8 to 00e6c33 Compare July 22, 2019 21:30
Comment thread eng/Versions.props
<MicrosoftDiaSymReaderNativePackageVersion>1.7.0</MicrosoftDiaSymReaderNativePackageVersion>
<!-- Infrastructure and test-only. -->
<MicrosoftSourceLinkVersion>1.0.0-beta2-18618-05</MicrosoftSourceLinkVersion>
<!-- TODO: Sort these into the above. These are out of the way at the moment to make it easier to resolve conflicts. -->

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'll do these with my merge commit. (If this PR is the way to go.)

Comment thread src/pkg/projects/windowsdesktop/src/windowsdesktop.depproj Outdated
<IgnoredReference Condition="'$(PackageTargetRuntime)' == ''" Include="DirectWriteForwarder" />

<!-- We want to intentionally exclude the ref assembly for System.Security.Permissions. -->
<IgnoredReference Condition="'$(PackageTargetRuntime)' == ''" Include="System.Security.Permissions" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Careful here: who's referencing this? I would have expected that reference to be gone. We should wait to remove it until it is.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I see... when I remove the ignore, the list is:

Assembly 'System.Xaml' is missing dependency 'System.Security.Permissions'
Assembly 'System.Configuration.ConfigurationManager' is missing dependency 'System.Security.Permissions'
Assembly 'System.Security.Cryptography.Xml' is missing dependency 'System.Security.Permissions'
Assembly 'WindowsBase' is missing dependency 'System.Security.Permissions'
Assembly 'System.Windows.Forms.Design.Editors' is missing dependency 'System.Security.Permissions'
Assembly 'System.Drawing' is missing dependency 'System.Security.Permissions'
Assembly 'System.DirectoryServices' is missing dependency 'System.Security.Permissions'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We need to determine why this stuff is pulling it in. Dangling type-forwards are OK, actual type references are not.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We haven't had an update from WPF for a while, and it looks like there are some relevant changes we don't have yet: dotnet/wpf@ea72094...master.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ah... dotnet-wpf-int isn't producing for 5.0 yet. Filed https://github.com/dotnet/core-setup/issues/7343 to figure out how to get these updated. For now, I'll keep System.Security.Permissions so the rest can be mergeable.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That's not the only cause for this. Some of these other dependencies are concerning. I suspect we'll need to suppress this, since even once everything is fixed WindowsBase will have typeforwards to System.Security.Permission, but we need to examine all the references before suppressing to find out if there is other work to do to safely omit this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Filed https://github.com/dotnet/core-setup/issues/7344 to follow up on this, I'll keep this PR to what seems doable before then. Thanks for the explanation, this makes sense. (I don't know what the best way to check the references is to get this done myself.)

<RuntimeOnlyPackageReference Include="System.DirectoryServices" Version="$(SystemDirectoryServicesVersion)" />
<RuntimeOnlyPackageReference Include="System.IO.FileSystem.AccessControl" Version="$(SystemIOFileSystemAccessControlVersion)" />
<RuntimeOnlyPackageReference Include="System.Threading.AccessControl" Version="$(SystemThreadingAccessControlVersion)" />
<RefOnlyPackageReference Include="System.IO.Pipes.AccessControl" Version="$(SystemIOPipesAccessControl)" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why did you need to explicitly make it RefOnly? Can we instead make conflict resolution do the work to remove anything that would conflict with the base shared-framework and lose?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

AFAIK we don't have tooling like that yet, I created https://github.com/dotnet/core-setup/issues/7340 to track that. Definitely seems possible.

@ericstj ericstj Jul 23, 2019

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What do you mean by "tooling like that"? It should be built into the SDK. You just need to set a property that points to the platform manifest you generated in this repository.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Scratch that, an item. Try just setting PackageConflictPlatformManifests item.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That's exactly what I mean, wasn't aware of that. 😄 I'll give it a try.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Seems to work as expected! Thanks!

I had to change GetNETCoreAppIgnoredReference a bit for closure validation: when verifying the runtime package, it ignores netcoreapp refs, not runtimes, causing a number of missing reference errors. I think that was just a bug that happened to rely on the asset duplication we had.

@dagood

dagood commented Jul 23, 2019

Copy link
Copy Markdown
Member Author

I diffed the data files (runtimelist/frameworklist) to get a summary of the results: https://gist.github.com/dagood/5f328e6148acd7cc8ee1afcc6c60f814. All the removals are in the NETCoreApp sfx, other changes look like what we intended.

@dagood

dagood commented Jul 23, 2019

Copy link
Copy Markdown
Member Author

I didn't rerun crossgen in my local build, which looks like it's failing now. Looking into it.

@ericstj

ericstj commented Jul 23, 2019

Copy link
Copy Markdown
Member

It's due to WindowsBase removal:

  Error generating PDB for 'F:\workspace\_work\1\s\artifacts\bin\win-x64.Debug\crossgen\windowsdesktop\runtimes/win-x64/lib/netcoreapp5.0/PresentationFramework.Aero.dll': Could not load type 'System.Windows.DependencyObject' from assembly 'WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
  Microsoft (R) CoreCLR Native Image Generator - Version 4.5.30319.0
  Copyright (c) Microsoft Corporation.  All rights reserved.

@dagood

dagood commented Jul 23, 2019

Copy link
Copy Markdown
Member Author

I'm going to apply this PR to release/3.0 directly to make progress. dotnet/wpf#1351 tracks fixing the WindowsBase conflict resolution problem for 5.0. (Some discussion about what's going on there in the gist: https://gist.github.com/dagood/5f328e6148acd7cc8ee1afcc6c60f814.)

@dleeapho

dleeapho commented Oct 2, 2019

Copy link
Copy Markdown

Should probably move this PR to the new dotnet/windowsdesktop repo.

@dagood

dagood commented Oct 4, 2019

Copy link
Copy Markdown
Member Author

This PR makes changes to some files now in the sharedfx tooling SDK and relies on the fact that netcoreapp and windowsdesktop are both in this repo, so I can't actually move the PR over. However, I opened dotnet/windowsdesktop#7 to track this and I'm closing this PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants