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

Windows Runtime package confusion and corruption. #34309

Closed
Gavin-Williams opened this issue Mar 31, 2020 · 3 comments
Closed

Windows Runtime package confusion and corruption. #34309

Gavin-Williams opened this issue Mar 31, 2020 · 3 comments

Comments

@Gavin-Williams
Copy link

Gavin-Williams commented Mar 31, 2020

Why are there 3 very similarly named packages?

System.Runtime.InteropServices.Windows.Runtime (4.3.0)
System.Runtime.InteropServices.WindowsRuntime (4.3.0)
System.Runtime.WindowsRuntime (4.7.0)

If System.Runtime.WindowsRuntime (4.7.0) is used, the app will actually crash as events will be wired up to the wrong assembly. The following output will be produced ...

Exception thrown at 0x75864192 in Demo.exe: Microsoft C++ exception: EEFileLoadException at memory location 0x1296D25C.

Exception thrown at 0x75864192 in Demo.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.

Exception thrown at 0x75864192 in Demo.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.

Exception thrown at 0x75864192 in Demo.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.

Exception thrown at 0x75864192 (KernelBase.dll) in Demo.exe: WinRT originate error - 0x80131040 : 'System.IO.FileLoadException: Could not load file or assembly 'System.Runtime.WindowsRuntime, Version=4.0.15.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at Engine.Interaction.MouseEventProcessor.OnPointerMoved(Object sender, PointerEventArgs e)'.

But WindowsRuntime 4.7.0 looks like the current version of WindowsRuntime 4.3.0 - and no idea why there is also a Windows.Runtime 4.3.0 - This is all a big screw-up if you ask me. We have to guess which one to use. Because when a project is setup in VS, they are not automatically added, events just won't compile with red-squigglies. I've just spent a week trying to find this bug.

Oh, and System.Runtime.InteropServices.WindowsRuntime (4.3.0) is only needed if events are used in a DLL (.net standard), because I suppose the Universal Windows package does actually include the right whatever. This is a minefield.

Is there any documentation about this? And no matter, projects shouldn't so easily be led into this situation. These packages need to be renamed if they are actually different packages.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Runtime untriaged New issue has not been triaged by the area owner labels Mar 31, 2020
@jeffschwMSFT jeffschwMSFT removed the untriaged New issue has not been triaged by the area owner label Apr 3, 2020
@jeffschwMSFT jeffschwMSFT added this to the 5.0 milestone Apr 3, 2020
@AaronRobinsonMSFT
Copy link
Member

/cc @jkoritzinsky @Scottj1s

@AaronRobinsonMSFT
Copy link
Member

These packages will be under going substantial change based on the work described at #35318.

@AaronRobinsonMSFT
Copy link
Member

Built in WinRT support has been removed. This package is no longer supported. See #37672.

@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.
Projects
None yet
Development

No branches or pull requests

5 participants