uwp.net-standard-2.0.net-nativerelease-builds

UWP release build fails


I have just upgraded my Windows app to UWP with a .net standard 2.0 library. The app is finished and now I am trying to create a release build but the build takes forever and eventually crashes with 138 errors conaining the error below and many more (see screenshot). Debug builds and runs without issues. I am using VS 2017 15.8.7. Wasting my time on this for hours now does anybody have any suggestions on how to fix this?

Method 'DynamicObjectTypeBuilder.BuildFormatterToDynamicMethod(Type, bool, bool, bool)' will always throw an exception due to the missing method 'DynamicMethod..ctor(string, Type, Type[], Type, bool)' in assembly 'System.Reflection.Emit.Lightweight'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.        

enter image description here


Solution

  • So I had 2 options to get rid of this issue:

    1. Fix the code of the 3rd party package so it would work with UWP.
    2. Remove the .net standard lib containing the 3rd party package from my UWP app and find another way to implement this functionality.

    Because I want to ship this app asap and I don't know how much work it will be to fix the 3rd party package, I chose option 2. So far for X-platform app development regarding UWP apps.