GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove built-in WinRT support from the runtime by jkoritzinsky · Pull Request #36715 · dotnet/runtime

Conversation

@jkoritzinsky

@jkoritzinsky jkoritzinsky commented May 19, 2020 •
edited by AaronRobinsonMSFT
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Now that C#/WinRT is public and is the new supported way forward for WinRT support in .NET, we can remove WinRT support from the runtime (or at least attempt to).

This is currently blocked on #36889

Fixes #33330
Fixes #37672

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

MichalStrehovsky, AaronRobinsonMSFT, elinor-fung, reflectronic, strangeman375, ericstj, giggio, and pentp reacted with hooray emoji
All reactions
  • 🎉 8 reactions
jkoritzinsky added 30 commits April 20, 2020 15:14
@jkoritzinsky
Remove WinRT-specific marshalers from the runtime side.
150b175
@jkoritzinsky
Remove managed WinRT support in System.Private.CoreLib
77a50e7
@jkoritzinsky
Block loading WinRT types into .NET.
2166b6b
Remove WinRT tests validating that projections work and replace them with a test that validates that WinRT types are blocked from being loaded into the runtime.
@jkoritzinsky
Remove System.Runtime.InteropServices.WindowsRuntime, System.Runtime.…
eb3ca0f
…WindowsRuntime, and System.Runtime.WindowsRuntime.UI.Xaml from libraries.
@jkoritzinsky
Remove WinRT-specific code in hr->exception translation.
ff74bba
@jkoritzinsky
Remove WinRT stub types.
1e05d67
@jkoritzinsky
Remove WinRT type redirection barring some vestigal parts in the RCW …
34f688c
…class.
@jkoritzinsky
Remove last vestiages of projections. Something is causing failures i…
4f54887
…n the old-style IEnumerable projection with VSD, but I'm not sure exactly what.
@jkoritzinsky
Just remove this branch that was only relevant in WinRT. It's the cor…
1a7bd15
…rect behavior to no-op now instead of asserting.
@jkoritzinsky
Don't throw away the return value here, actually use it.
27fe8c4
@jkoritzinsky
Remove WinRTTypeNameConverter
21d7cd5
@jkoritzinsky
Remove winrthelpers.h and winrthelpers.cpp. Start putting blocks in f…
cd2eb2f
…or loading winmds.
@jkoritzinsky
Remove old winrthost that we never shipped.
6877fd5
@jkoritzinsky
Remove the WinMD binder and related WinMD utilities.
3bdfb39
@jkoritzinsky
Add back automatic WinRT apartment initialization.
346b52a
@jkoritzinsky
Remove unused delay loads.
b68881d
@jkoritzinsky
Merge branch 'master' of https://github.com/dotnet/runtime into remov…
a143172
…e-winrt
@jkoritzinsky
Restore WinRTSupported() to make sure we correctly initialize WinRT t…
00951a9
…hread apartments.
@jkoritzinsky
Clean up comments and remove much of the winmd-specific assembly/type…
d0101e3
… loading logic.
@jkoritzinsky
Remove rooting of now-removed types.
2ccf720
@jkoritzinsky
Remove always-false WinRT flags from EEClass and related code.
d275680
@jkoritzinsky
Remove WinRT-specific CCW flags.
1de6a16
@jkoritzinsky
Remove WinRT weak handles support in the runtime.
4e0512d
@jkoritzinsky
Remove WinRT references in AppDomain and remove dead code from StubHe…
73687a4
…lpers that used the AppDomain support.
@jkoritzinsky
Merge branch 'master' of https://github.com/dotnet/runtime into remov…
e22706b
…e-winrt
@jkoritzinsky
Revert "Remove WinRT weak handles support in the runtime."
4fc4fbd
This reverts commit 4e0512d.
@jkoritzinsky
Reduce amount of work before we refuse to load a winmd.
a10f75c
@jkoritzinsky
Merge branch 'master' of https://github.com/dotnet/runtime into remov…
2c54204
…e-winrt
@jkoritzinsky
Throw when resolving the assemblyRef entry. Don't even get to the poi…
e847ec0
…nt to creating an assemblySpec.
@jkoritzinsky
Remove more unneeded support for winmds in the assembly loader.
b36bec0
@ericstj

ericstj commented May 29, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

If someone runs code that loads System.Runtime.InteropServices.WindowsRuntime.dll, they'll get a FileNotFound exception when loading the assembly

What about System.Runtime.WindowsRuntime and System.Runtime.WindowsRuntime.Ui.Xaml? Will they hit one of the other failure modes first?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jkoritzinsky

jkoritzinsky commented May 29, 2020

Copy link
Copy Markdown
Member Author

Those two assemblies ship out of band in packages anyway, so they will continue to work until someone touches a WinRT type. The entire surface area of System.Runtime.WindowsRuntime uses WinRT types so it will fail with the PNSE failure. The System.Runtime.WindowsRuntime.UI.Xaml assembly has some non WinRT types, so those types will continue to work as expected, and the others will fail with PNSE.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jkoritzinsky

jkoritzinsky commented May 30, 2020

Copy link
Copy Markdown
Member Author

I believe all feedback here has been addressed. There's some follow-up cleanup around the edges that Aaron has pointed out that we can do in a later PR.

To make sure that we get this in before the Preview 6 cut, I'm going to merge this in now.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jkoritzinsky
jkoritzinsky merged commit f62e934 into dotnet:master May 30, 2020
@jkoritzinsky
jkoritzinsky deleted the remove-winrt branch May 30, 2020 00:37
@kekekeks kekekeks mentioned this pull request May 30, 2020
Possible Interop Story WinRT AvaloniaUI/Avalonia#4045
Open
@AaronRobinsonMSFT AaronRobinsonMSFT mentioned this pull request May 31, 2020
Add testing for our WinRT-specific marshalers #12321
Closed
8 of 9 tasks
@eerhardt eerhardt mentioned this pull request Jun 1, 2020
Share portions of CoreCLR and Mono CoreLib's ILLinkTrim.xml file #37255
Closed
eerhardt added a commit to eerhardt/runtime that referenced this pull request Jun 1, 2020
@eerhardt
Update Mono CoreLib LinkerDescriptor to match CoreCLR
f2b59c9
dotnet#36715 and dotnet#37083 modified the CoreCLR version of CoreLib's linker descriptor file, but left them in the Mono version.

dotnet#37255 will address sharing the duplicated parts of these files.
@eerhardt eerhardt mentioned this pull request Jun 1, 2020
Update Mono CoreLib LinkerDescriptor to match CoreCLR #37257
Merged
@Scottj1s Scottj1s mentioned this pull request Jun 1, 2020
Remove workarounds when .Net 5.0 Preview 6 rolls out microsoft/CsWinRT#294
Closed
jkotas pushed a commit that referenced this pull request Jun 1, 2020
@eerhardt
Update Mono CoreLib LinkerDescriptor to match CoreCLR (#37257)
b463ce2
#36715 and #37083 modified the CoreCLR version of CoreLib's linker descriptor file, but left them in the Mono version.

#37255 will address sharing the duplicated parts of these files.
@ryalanms ryalanms mentioned this pull request Jun 4, 2020
[release/5.0-preview6] Update dependencies from dotnet/winforms dotnet/wpf#3082
Merged
elinor-fung added a commit to elinor-fung/runtime that referenced this pull request Jun 4, 2020
@elinor-fung
Revert "Remove built-in WinRT support from the runtime (dotnet#36715)"
b7596a2
This reverts commit f62e934.
eerhardt added a commit to eerhardt/runtime that referenced this pull request Jun 5, 2020
@eerhardt
Remove WinRT specific code from EventSource.
2d086e4
Follow up to dotnet#36715
@eerhardt eerhardt mentioned this pull request Jun 5, 2020
Remove WinRT specific code from EventSource. #37508
Merged
ghost pushed a commit that referenced this pull request Jun 6, 2020
@eerhardt
Remove WinRT specific code from EventSource. (#37508)
aa4d705
* Remove WinRT specific code from EventSource.

Follow up to #36715

* Remove EventSource.GetMetadata method, which was only used by ProjectN.
@ViktorHofer

ViktorHofer commented Jun 9, 2020

Copy link
Copy Markdown
Member

Any reason why we haven't removed https://github.com/dotnet/runtime/tree/master/src/libraries/mscorlib.WinRT-Facade which was only referenced by the WindowsRuntime projects?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ericstj

ericstj commented Jun 9, 2020

Copy link
Copy Markdown
Member

Nope, if no-one is referencing it, delete it. It's only used for consuming winmds in src build before we've built the mscorlib shim.

AaronRobinsonMSFT reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ViktorHofer ViktorHofer mentioned this pull request Jun 9, 2020
Delete dead mscorlib winrt facade #37660
Merged
@AaronRobinsonMSFT AaronRobinsonMSFT mentioned this pull request Jun 9, 2020
Built-in support for WinRT is removed from .NET 5.0 dotnet/docs#18875
Closed
@sywhang sywhang mentioned this pull request Jun 16, 2020
Implement AsyncCausalityTracer #37945
Closed
@sywhang sywhang mentioned this pull request Jun 24, 2020
Remove AsyncCausalityTracer by logging into TplEventSource directly #38313
Merged
@nattress nattress mentioned this pull request Jun 29, 2020
System.Runtime.WindowsRuntime fails building with Crossgen #33885
Closed
@brettfo brettfo mentioned this pull request Jul 7, 2020
don't auto-resolve types from System.Runtime.WindowsRuntime dotnet/fsharp#9644
Merged
@ericstj ericstj mentioned this pull request Jul 20, 2020
Build failure when building libraries build with -allConfigurations #34200
Closed
This was referenced Sep 18, 2020
Delete using WindowsRuntime from unit test tui-cs/Terminal.Gui#899
Merged
Revise arm64_unix_skip_list in runtest.py #42577
Closed
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@janvorli janvorli janvorli left review comments
@jkotas jkotas jkotas approved these changes
@AaronRobinsonMSFT AaronRobinsonMSFT AaronRobinsonMSFT approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

area-Interop-coreclr breaking-change Issue or PR that represents a breaking API or functional change over a previous release.

Projects

None yet

Milestone

5.0.0

Development

Successfully merging this pull request may close these issues.

[Breaking change] Removal of built-in WinRT support in .NET 5.0 [mono] Tests failed on windows: System.Runtime.WindowsRuntime.Tests [mono] Tests failed on windows: System.Runtime.InteropServices.WindowsRuntime.Tests [Mono] Test failed on windows: System.Tests.ActivatorTests.TestingCreateInstanceObjectHandleFullSignatureWinRT Remove some WinRT code that was replaced by the new ComWrappers API.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@jkoritzinsky @stephentoub @AaronRobinsonMSFT @ericstj @ViktorHofer @jkotas @janvorli
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.