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

[Bug] Unhandled exception. System.MissingMethodException: Method not found: 'System.Collections.Generic.IReadOnlyList`1<System.Object> Avalonia.Markup.Xaml.XamlIl.Runtime.IAvaloniaXamlIlEagerParentStackProvider.get_DirectParents() #265

Closed
1 task
Konfus-dev opened this issue Aug 8, 2024 · 5 comments

Comments

@Konfus-dev
Copy link

Konfus-dev commented Aug 8, 2024

Check the following items

  • I have looked up relevant Issue

Description of the issue

When attempting to setup SukiUI I added the theme to my App.Styles collection like so:

<Application.Styles>
    <FluentTheme></FluentTheme>
    <suki:SukiTheme ThemeColor="Blue"/>
</Application.Styles>

Which fails to build with the callstack:

System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
   at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncTrimPromise`1.Complete(TInstance thisRef, Func`3 endMethod, IAsyncResult asyncResult, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Avalonia.Remote.Protocol.BsonStreamTransportConnection.<ReadExact>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Avalonia.Remote.Protocol.BsonStreamTransportConnection.<Reader>d__16.MoveNext()
13:46:49.704 [Information]  Started AvaloniaDesigner.CreateCompletionMetadataAsync() for "C:\Users\jercl\Projects\Toybox\Build\bin\net8.0\Editor.dll"
13:46:49.705 [Information]  Starting previewer process for '"C:\Users\jercl\Projects\Toybox\Build\bin\net8.0\Editor.dll"'
13:46:49.709 [Information] 6852 Started previewer process for '"C:\Users\jercl\Projects\Toybox\Build\bin\net8.0\Editor.dll"'. Waiting for connection to be initialized.
13:46:49.807 [Information] 6852 Connection initialized
13:46:49.973 [Error] 6852 <= "Unhandled exception. System.MissingMethodException: Method not found: 'System.Collections.Generic.IReadOnlyList`1<System.Object> Avalonia.Markup.Xaml.XamlIl.Runtime.IAvaloniaXamlIlEagerParentStackProvider.get_DirectParents()'."
13:46:49.974 [Error] 6852 <= "   at SukiUI.SukiTheme.!XamlIlPopulate(IServiceProvider, SukiTheme)"
13:46:49.975 [Error] 6852 <= "   at SukiUI.SukiTheme.!XamlIlPopulateTrampoline(SukiTheme)"
13:46:49.979 [Error] 6852 <= "   at SukiUI.SukiTheme..ctor()"
13:46:49.980 [Error] 6852 <= "   at Toybox.App.!XamlIlPopulate(IServiceProvider, App) in C:\Users\jercl\Projects\Toybox\Editor\Editor\App.axaml:line 14"
13:46:49.982 [Error] 6852 <= "   at Toybox.App.!XamlIlPopulateTrampoline(App)"
13:46:49.984 [Error] 6852 <= "   at Toybox.App.Initialize() in C:\Users\jercl\Projects\Toybox\Editor\Editor\App.axaml.cs:line 15"
13:46:49.986 [Error] 6852 <= "   at Avalonia.AppBuilder.SetupUnsafe()"
13:46:49.988 [Error] 6852 <= "   at Avalonia.AppBuilder.Setup()"
13:46:49.989 [Error] 6852 <= "   at Avalonia.AppBuilder.SetupWithoutStarting()"
13:46:49.991 [Error] 6852 <= "   at Avalonia.DesignerSupport.Remote.RemoteDesignerEntryPoint.AppInitializer.ConfigureApp(IAvaloniaRemoteTransportConnection transport, CommandLineArgs args, Object obj)"
13:46:49.994 [Error] 6852 <= "   at Avalonia.DesignerSupport.Remote.RemoteDesignerEntryPoint.Main(String[] cmdline)"
13:46:49.997 [Error] 6852 <= "   at Avalonia.Designer.HostApp.Program.Main(String[] args)"

Package Version

6.0.0-beta7

Environment

Windows 11 Home Version 23H2

Expected Behavior

I expect to be able to use the theming without errors being thrown on build as well as the .axaml previewer to work correctly, currently neither work due to this exception when using a SukiTheme in my application.

Reproduction

Installed via the nuget package manager in VS 2022, then followed the steps provided here: https://github.com/kikipoulet/SukiUI/wiki/1.-Installation to modify my app with SukiUI theming and use the SukiWindow for my main window.

Additional Information

The application I'm attempting to setup with SukiUI is publicly available in this repo, its the Editor cs app under the Editor folder: https://github.com/Konfus-dev/Toybox

@randolfly
Copy link

I think the problem is beacuse the nuget package is not updated.
I introduced the newest package from the CI process, and it works for me.

  • assembly config: image
  • example window: image

@Konfus-dev
Copy link
Author

I'm using the latest available (6.0.0-beta7), is that not the true latest? If not could the nuget package be updated?

@AuroraZiling
Copy link
Collaborator

You can try the latest .dll generated by CI to troubleshoot the problem

@YJammak
Copy link
Contributor

YJammak commented Aug 12, 2024

I think it's time to upgrade the version in nuget. Using nuget to manage libraries is a very friendly way.

@kikipoulet
Copy link
Owner

I think it's time to upgrade the version in nuget. Using nuget to manage libraries is a very friendly way.

Guys be patient, it's still in beta state. (Even if it's not far from final version now 🙏).

Releasing a beta in a middle of major changes just because there is a Avalonia new minor version isn't my priority to be honest. Be patient, a new beta version will come in few weeks with latest changes, closer to final version and to the ideal design the library aimed from the start.

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

5 participants