benruehl / adonis-ui

Lightweight UI toolkit for WPF applications offering classic but enhanced windows visuals
https://benruehl.github.io/adonis-ui/
MIT License
1.71k stars 143 forks source link

XamlParseException when using AdonisWindow control #37

Closed mettelephant closed 4 years ago

mettelephant commented 4 years ago

When switching Window control to AdonisWindow, on startup application breaks with a XamlParseException and an inner exception with a message of: IOException: Cannot locate resource 'defaultstyles/calendar.xaml'.

To Reproduce

  1. Create new dotnet core project.
  2. Reference AdonisUI and AdonisUI ClassicTheme.
  3. Replace MainWindow.xaml references to Window with AdonisWindow. Add necessary xmlns namespaces.
  4. Replace backing MainWindow.xaml.cs references to Window with AdonisWindow. Add necessary using namespaces.
  5. Launch Application > break mode

Expected behavior Expect application to launch and window to appear.

nkristek commented 4 years ago

Thank you for reporting this, I was able to reproduce this using the 1.12 nuget package. Furthermore I was able to verify that it only occurs when using the nuget package in a .NET Core 3.0 WPF application. In a .NET Framework WPF application this exception is not thrown.

Since this error does not occur when using a nuget package created after merging #36 (b4c419d), a temporary fix would be to temporarily reference the projects directly until a new nuget package is released.

benruehl commented 4 years ago

I will create a minor release for you which includes the dotnet core update of #36. I might be able to do so this evening (in like 10 h from now) or tomorrow.

benruehl commented 4 years ago

Release 1.12.1 is out and I cannot reproduce the issue with that one. @mettelephant please reopen in case you still receive the error.