ddobrev / QtSharp

Mono/.NET bindings for Qt
Other
571 stars 52 forks source link

VisualStudio is crashing | “System.InvalidCastException” in Microsoft.CodeAnalysis.Workspaces.dll #75

Closed djonasdev closed 6 years ago

djonasdev commented 6 years ago

I have a simple WPF app where I have included the QtSharp library.

The problem is that my VisualStudio 2017 v15.5.7 is crashing whenever it tries to load the QtSharp DLLs for it's intelliSense. Somebody know how to prevent crashing or ignoring f.e. a System.InvalidCastException? I have already stoppped ReSharper to exlude this. The following Screenshot and StackTrace is shown when I inject a debugger (See link).

It's a very strange behavior because on some methods or overloads it's working like a charm without any problems and after some minutes or (for example) if using the AddWidget() method it crashes.

https://stackoverflow.com/questions/49260487/system-invalidcastexception-in-microsoft-codeanalysis-workspaces-dll

Best Regards Dominic

ddobrev commented 6 years ago

Please try upgrading Visual Studio and see if you still get this.

djonasdev commented 6 years ago

My colleague has successfully opened my sample app. But he has installed Qt 5.9.4. I had installed 5.10.1. Will update this comment, when I have tested it with the "new" version.

djonasdev commented 6 years ago

It works! Problem was to use v5.10.1