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

Issue when integrating with Avalonia 11.0 preview 2 #25

Closed
rabbitism opened this issue Oct 15, 2022 · 3 comments · Fixed by #31
Closed

Issue when integrating with Avalonia 11.0 preview 2 #25

rabbitism opened this issue Oct 15, 2022 · 3 comments · Fixed by #31
Labels
enhancement New feature or request

Comments

@rabbitism
Copy link
Contributor

System.IO.FileNotFoundException: Could not load file or assembly 'Avalonia.Styling, Version=0.10.16.0, Culture=neutral, PublicKeyToken=c8d484a7012f9a8b'. The system cannot find the file specified.
File name: 'Avalonia.Styling, Version=0.10.16.0, Culture=neutral, PublicKeyToken=c8d484a7012f9a8b'
   at Prism.Common.MvvmHelpers.AutowireViewModel(Object viewOrViewModel)
   at Prism.PrismApplicationBase.Initialize()
   at Snippist.App.Initialize() in C:\Workspace\Galaxism\Snippist\src\App.axaml.cs:line 20
   at Avalonia.Controls.AppBuilderBase`1.Setup()
   at Avalonia.Controls.AppBuilderBase`1.SetupWithLifetime(IApplicationLifetime lifetime)
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode)
   at Snippist.Program.Main(String[] args) in C:\Workspace\Galaxism\Snippist\src\Program.cs:line 14

Seems like Styling related is integrated in Avalonia.Base assembly. Could you please setup a sample that works for 11.0 preview?

@rabbitism
Copy link
Contributor Author

I can run it well when setting all dependencies to 11.0 in this repo's samples. but when referencing them in my own project, it will fail.

@DamianSuess DamianSuess added the enhancement New feature or request label Oct 17, 2022
@DamianSuess
Copy link
Collaborator

Thank you for the heads @rabbitism on what's coming down the pipeline with Avalonia v0.11. Considering Preview 2 was just released 9 days ago, this gives us time to prepare.

Looks like we're going to have to provide a solution to support v0.10.x and 0.11.x if this is a breaking change.

You are always welcome to contribute and submit a PR 👍

@mathmakesmemighty
Copy link

mathmakesmemighty commented Oct 27, 2022

I can run it well when setting all dependencies to 11.0 in this repo's samples. but when referencing them in my own project, it will fail.

I had the same issue with Preview2 @ my own Caliburn.Micro project - then I realized it was the Material.Icons dependency causing it. Changing the App.axaml like
<Application.Styles>
<!--<StyleInclude Source="avares://Material.Icons.Avalonia/App.xaml"/>-->
<SimpleTheme Mode="Light"/>
</Application.Styles>

resolved it for me.

Update: Although I just noticed your exception refers to a call of Avalonia.Styling, Version=0.10.16.0 whereas I think mine was about Version 0.10.0.0 - then it might as well be something else (including Prism.Avalonia - I haven't looked at it).

@DamianSuess DamianSuess linked a pull request Dec 6, 2022 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants