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

PushRenderOptions error on run #6

Closed
hawkerm opened this issue Oct 19, 2023 · 4 comments
Closed

PushRenderOptions error on run #6

hawkerm opened this issue Oct 19, 2023 · 4 comments

Comments

@hawkerm
Copy link

hawkerm commented Oct 19, 2023

Followed the setup instructions and compared against the HelloWorld example in my own project, but am getting the following error:

System.TypeLoadException
  HResult=0x80131522
  Message=Method 'PushRenderOptions' in type 'Avalonia.Skia.DrawingContextImpl' from assembly 'Avalonia.Skia, Version=11.0.0.0, Culture=neutral, PublicKeyToken=c8d484a7012f9a8b' does not have an implementation.
  Source=Avalonia.Skia
  StackTrace:
   at Avalonia.Skia.SkiaGpuRenderTarget.CreateDrawingContext() in /_/src/Skia/Avalonia.Skia/Gpu/SkiaGpuRenderTarget.cs:line 37
   at Avalonia.Rendering.Composition.Server.ServerCompositionTarget.Render()

Any idea what might cause this issue?

(Using Godot 4.1.1 on Windows 10)

@MrJul
Copy link
Owner

MrJul commented Oct 20, 2023

You probably have a package version mismatch. Currently Estragonia targets Avalonia 11.0.0, but you probably referenced directly another Avalonia package with version 11.0.x? Try to downgrade it to 11.0.0 instead.

It's due time for another Estragonia release targeting the latest Avalonia, as there were many bug fixes in the past months.

If you want to target Avalonia 11.0.5 explicitly, you can force the version by adding this line to your csproj:
<PackageReference Include="Avalonia.Skia" Version="[11.0.5]" />

Note that it's generally discouraged, but you should be fine nonetheless with 11.0.0 to 11.0.5.

@hawkerm
Copy link
Author

hawkerm commented Oct 20, 2023

Thanks @MrJul I think when I added the Avalonia theme package, as called out as one of the instructions. It pulled the latest, which also bumped the Avalonia version up. Wouldn't have expected a patch version to cause such issues.

Changed it to this:

<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0" />

And then the exception went away.

Not seeing anything render though, so will have to maybe just trying to download the sample first directly to see if that works on my machine.

@MrJul
Copy link
Owner

MrJul commented Oct 22, 2023

Nothing rendering sounds like no theme has been applied.

Please try the samples and let me know if you encounter any issue.

@MrJul
Copy link
Owner

MrJul commented Nov 6, 2023

I've just published Estragonia 1.0.2 which targets Avalonia 11.0.5, which is the latest and should solve the mismatching assemblies issue (ensure that your theme reference also targets 11.0.5).

I'm closing this issue, please feel free to reopen if you still encounter any problem after updating.

@MrJul MrJul closed this as completed Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants