reactiveui / ReactiveUI

An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms that is inspired by functional reactive programming. ReactiveUI allows you to abstract mutable state away from your user interfaces, express the idea around a feature in one readable place and improve the testability of your application.
https://www.reactiveui.net
MIT License
8.08k stars 1.12k forks source link

[BUG] .Net Compile fails with Microsoft.NETCore.UniversalWindowsPlatform 6.1.9 #1957

Closed harvinders closed 5 years ago

harvinders commented 5 years ago

Describe the bug .Net native compilation fails whilst building UWP app with reference to package Microsoft.NETCore.UniversalWindowsPlatform version to 6.1.9. Changing it to 6.2.3 fixed the issue

Steps To Reproduce Provide the steps to reproduce the behavior:

  1. Create a simple UWP app or WTS app
  2. Set the Microsoft.NETCore.UniversalWindowsPlatform version to 6.1.9 (In WTS this is the default)
  3. Add ReactiveUI nuget package to the main project
  4. Build release configuration
  5. Compilation errors

Expected behavior It should build.

Screenshots

1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): warning : ILTransform : warning ILT0005: Type 'System.Runtime.CompilerServices.IAsyncStateMachine' from assembly 'System.Runtime' was not included in compilation, but was referenced in method 'BitmapImageBitmap.<Save>d__8.SetStateMachine(IAsyncStateMachine)'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): warning : ILTransform : warning ILT0003: Method 'BitmapImageBitmap.<Save>d__8.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncTaskMethodBuilder.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): warning : ILTransform : warning ILT0003: Method 'DispatcherMixin.<RunTaskAsync>d__0.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncTaskMethodBuilder<T>.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): warning : ILTransform : warning ILT0003: Method 'WriteableBitmapImageBitmap.<Save>d__9.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncTaskMethodBuilder.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): warning : ILTransform : warning ILT0003: Method 'DispatcherMixin.<>c__DisplayClass0_0.<<RunTaskAsync>b__0>d.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncVoidMethodBuilder.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): warning : ILTransform : warning ILT0003: Method 'DispatcherMixin.<>c__DisplayClass1_0.<<RunTaskAsync>b__0>d.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncTaskMethodBuilder<bool>.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): warning : ILTransform : warning ILT0003: Method 'PlatformBitmapLoader.<>c__DisplayClass0_0.<<Load>b__0>d.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncTaskMethodBuilder<IBitmap>.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): warning : ILTransform : warning ILT0003: Method 'PlatformBitmapLoader.<>c__DisplayClass1_0.<<LoadFromResource>b__0>d.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncTaskMethodBuilder<IBitmap>.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): warning : ILTransform : warning ILT0003: Method 'PlatformModeDetector.<>c.<<SearchForAssembly>b__2_2>d.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncTaskMethodBuilder<string[]>.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>  Cleaning up unreferenced code
1>  Generating native code
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): error : Error: NUTC303E:Internal Compiler Error: No matches found for a constrained call to method 'instance System.Void System.Runtime.CompilerServices.IAsyncStateMachine.MoveNext()' on type 'Splat.WriteableBitmapImageBitmap+<Save>d__9' from assembly 'Splat' while compiling method 'static System.Void System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start<Splat.WriteableBitmapImageBitmap+<Save>d__9>(Splat.WriteableBitmapImageBitmap+<Save>d__9&)'.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): error : Type 'System.Runtime.CompilerServices.IAsyncStateMachine' from assembly 'System.Runtime' was not included in compilation, but was referenced in method 'BitmapImageBitmap.<Save>d__8.SetStateMachine(IAsyncStateMachine)'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): error : Method 'BitmapImageBitmap.<Save>d__8.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncTaskMethodBuilder.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): error : Method 'DispatcherMixin.<RunTaskAsync>d__0.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncTaskMethodBuilder<T>.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): error : Method 'WriteableBitmapImageBitmap.<Save>d__9.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncTaskMethodBuilder.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): error : Method 'DispatcherMixin.<>c__DisplayClass0_0.<<RunTaskAsync>b__0>d.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncVoidMethodBuilder.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): error : Method 'DispatcherMixin.<>c__DisplayClass1_0.<<RunTaskAsync>b__0>d.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncTaskMethodBuilder<bool>.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): error : Method 'PlatformBitmapLoader.<>c__DisplayClass0_0.<<Load>b__0>d.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncTaskMethodBuilder<IBitmap>.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): error : Method 'PlatformBitmapLoader.<>c__DisplayClass1_0.<<LoadFromResource>b__0>d.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncTaskMethodBuilder<IBitmap>.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): error : Method 'PlatformModeDetector.<>c.<<SearchForAssembly>b__2_2>d.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncTaskMethodBuilder<string[]>.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): error : Type 'System.Runtime.CompilerServices.IAsyncStateMachine' from assembly 'System.Runtime' was not included in compilation, but was referenced in method 'BitmapImageBitmap.<Save>d__8.SetStateMachine(IAsyncStateMachine)'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): error : Method 'BitmapImageBitmap.<Save>d__8.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncTaskMethodBuilder.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): error : Method 'DispatcherMixin.<RunTaskAsync>d__0.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncTaskMethodBuilder<T>.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): error : Method 'WriteableBitmapImageBitmap.<Save>d__9.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncTaskMethodBuilder.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): error : Method 'DispatcherMixin.<>c__DisplayClass0_0.<<RunTaskAsync>b__0>d.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncVoidMethodBuilder.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): error : Method 'DispatcherMixin.<>c__DisplayClass1_0.<<RunTaskAsync>b__0>d.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncTaskMethodBuilder<bool>.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): error : Method 'PlatformBitmapLoader.<>c__DisplayClass0_0.<<Load>b__0>d.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncTaskMethodBuilder<IBitmap>.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): error : Method 'PlatformBitmapLoader.<>c__DisplayClass1_0.<<LoadFromResource>b__0>d.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncTaskMethodBuilder<IBitmap>.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): error : Method 'PlatformModeDetector.<>c.<<SearchForAssembly>b__2_2>d.SetStateMachine(IAsyncStateMachine)' will always throw an exception due to the missing method 'AsyncTaskMethodBuilder<string[]>.SetStateMachine(IAsyncStateMachine)' in assembly 'System.Threading.Tasks'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
1>C:\Users\AUser\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): error : ILT0005: 'C:\Users\AUser\.nuget\packages\runtime.win10-x86.microsoft.net.native.compiler\2.1.8\tools\x86\ilc\Tools\nutc_driver.exe @"C:\Users\AUser\source\repos\App1\App1\obj\x86\Release\ilc\intermediate\MDIL\App1.rsp"' returned exit code 1

Environment(please complete the following information):

Additional context Issue #2949 in WTS

glennawatson commented 5 years ago

What version of ReactiveUI are you using?

glennawatson commented 5 years ago

I'm guessing 9.11?

There was a recent change that downgraded the included version of Microsoft.NetCore.UniversalWindowsPlatform in MsBuild.Sdk.Extras from 6.2.2 to 6.1.9.

Splat hasn't caught up with that.

Since this is a duplicate of https://github.com/reactiveui/splat/issues/281 closing this one. Feel free to track it there.

open-collective-bot[bot] commented 5 years ago

Hey :wave:,

We saw you use our package. To keep our code as accessible as possible, we decided to open source it and are now helping others with their questions.

In a pursuit to continue our work, help us by donating to our collective! :heart:

https://opencollective.com/reactiveui

ReactiveUI - Open Collective
An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms!