Reputation: 169
I am using a dll component called wnvhtmlconvert to generate pdf from html. It was working curretly last week, then now it started to get a COMException only when i am debbuging.
Bellow the output error:
An exception of type 'System.Runtime.InteropServices.COMException' occurred in System.Windows.Forms.dll and wasn't handled before a managed/native boundary
Additional information: Unknown error.
On another machine it work's normally when debbuging and published.
I have already tried to registry the wnvhtmlconvert.dll but it is not possible problably because it mustn't be registrable.
Any suggestion?
TY
Upvotes: 1
Views: 4236
Reputation: 73
Go to Tools/Options/Debugging/General in Visual Studio. Uncheck Break when exceptions cross AppDomain or managed/native boundries...
Upvotes: 0
Reputation: 328
You have one of your debugging options set improperly for dealing with native code debugging. You can try toggling a few of those options to stop the behavior, or you can reset your debugging options back to the installation defaults by performing the following (based upon VS 2015 - PROCEED AT YOUR OWN RISK!):
Voila - just your debugger options have been left at the default settings! This worked for me, and I no longer see the odd behavior around the native code.
Good luck!
Upvotes: 2
Reputation: 5367
You probably do something in a non-UI thread, or forgot to pin a reference.
Upvotes: 0