convertersystems / opc-ua-client

Visualize and control your enterprise using OPC Unified Architecture (OPC UA) and Visual Studio.
MIT License
403 stars 119 forks source link

WPF on .NET 5 #185

Closed dubeg closed 3 years ago

dubeg commented 3 years ago

Hi team, I just started playing with your library, and so I created a Console on .NET 5 using your sample code: everything worked fine. However, I couldn't get it to work on Wpf on .NET 5. I set it up exactly as in your sample Wpf .NET 4.6 app, but it wouldn't log anything in the Output window and the window would only show "connecting". I don't know much about async machinery, but I noticed it hanged on await this.whenSubscribed.Task in SubscriptionBase.

On the other hand, when I recreated your wpf sample using .NET 4.8, everything worked fine.

Is this something you ever tried?

dubeg commented 3 years ago

Wait, my mistake. My working sample had DataContext = MainViewModel(), while the non-working sample had MainViewModel as a property on MainWindow, and even though the bindings were like Binding ViewModel.ServerServerStatus, that's what made it break.

awcullen commented 3 years ago

Thanks for testing the library. We appreciate your feedback!