I have a Visual Studio Extension (VSIX package) that shows a WinForms dialog and then returns a string that is inserted into the code editor window in VS.
The WinForm loads fine. I can return a hard coded string and VS puts it into the editor. However, if the WinForm makes a call to a 3rd party library (it is a .Net Core class library) it stops execution without an exception I can see and closes the form out. To test further, I had the referenced library simply return a hard coded string so there wasn't risk of an Exception in that code and it failed it (which makes me believe it's the action of calling the library.. if I step through this with a debugger it will not execute a procedure that makes a called to the referenced library.. if I comment out that line it will step through that procedure). If I pluck the form out and put it in a WinForms app it executes as expected.
The referenced library was loaded into the extension via a local NuGet feed.
- The 3rd party library isn't signed currently, could that be the issue?
- The 3rd party library is a "Class Library (.Net Core)".. there's no option I can see through the GUI to sign the library like you can with traditional class libraries (although this targets .Net 4.6). The WinForm itself can call it if it's in a different solution, it barfs when run through the VS Extension.
- What else could cause this problem?
Side note, this is an extension for myself and not general distribution.