unoplatform / Uno.Themes

This library is designed to help you use the Material, Fluent or Cupertino design system with the Uno Platform
https://platform.uno
Apache License 2.0
170 stars 32 forks source link

TypeLoadException when using a custom Configuration on UWP #631

Open RoyconSkylands opened 3 years ago

RoyconSkylands commented 3 years ago

Current behavior

The UWP head will crash immeditly on startup with Exception thrown: 'System.TypeLoadException' in Uno.Material.dll When using a custom build configuration, if using Debug it will run fine

Expected behavior

Any custom configuration to run fine, matching Debug

How to reproduce it (as minimally and precisely as possible)

Create a new empty uno project Run Debug == Works Go to configuration manager and add a custom solution wide configuration (I called mine Mock and copied settings from Debug, I had Create new project configurations checked) Make sure UWP is set to build and deploy Run new configuration == Works Add Uno.Material to UWP head Run again = Crash

See : https://github.com/ConroyG/Uno_CustomConfiguration_TypeLoadException

Environment

Nuget Package: Uno.Material

Package Version(s): 1.0.0-dev.827 (latest)

Affected platform(s):

Anything else we need to know?

I've tried updating my UWP Targeting versions and all nuget packages in the UWP head but no luck

jeromelaban commented 3 years ago

Thanks for the report. Can you provide the full stack trace of the exception? Also, there's an inner exception when this exception is raised, can you provide it as well?

RoyconSkylands commented 3 years ago

When it crashes I don't get a strack trace, maybe there's a setting somewhere in visual studio I need to turn on so I get stacktraces for code that isn't mine?

Does the sample work for you?

Any ideas what settings i need to change to get a proper stack trace from visual studio, when it crashes it gives me very little details I get this: image

If I hit cancel VS just stops running and the only option is to grab the 1 line error (no stack trace) from my console log Exception thrown: 'System.TypeLoadException' in Uno.Material.dll

If i hit OK a new VS opens but does nothing, I'm guessing its trying to attach to the process, but it cant

jeromelaban commented 3 years ago

This looks like a UWP tooling issue which we cannot fix.

If you need the solution configuration, don't create individual configuration for projects, or not for the UWP one.