NETDEFGEN not generating event DLL
I am running Extend 10.0.0 on Windows 10, 64-bit, but developing for 32-bit. I have been developing a .NET DLL to use with our COBOL app over the last couple of months, and NETDEFGEN has been creating the DEF file just fine and I can run the app. Now I'm trying to add events that will be caught by COBOL, and I expected NETDEFGEN to create the event DLL, like it did for the sample program AmortControl. The documentation says that occasionally, I might get the error "The Event Handler Compilation Failed" but the DEF file would generated normally. Well, the DEF did, but the event DLL did not.
What can I check? I built the .NET DLL with Framework 4, build platform x86. The NETDEFGEN setting is using 32-bit 4.0 ilasm.exe. The Class Member screen in NETDEFGEN shows that I have Events, but when I click Generate, I get the error message, and no event DLL. I generated for AmortControl under these conditions, and it worked. My next course of action is to start adding to AmortControl until I stumble across something. But I thought I could save myself some work if someone else has experienced this and can help me out.
The exact error message is: C:\Windows\Microsoft.NET\Framework\v4.0.30319\ilasm.exe Event Handler Compilation Failed .
RE: NETDEFGEN not generating event DLL
When I ran NETDEFGEN on this new DLL, I got the Event Handler failed message, and there was no handler generated. So I deleted the grid control from the canvas, but left the DLLS as project resources. That was successful, and the event handler DLL was generated. This was done in NET Framework 2.
The sample program AmortControl processes as detailed in documentation. I commented out the statements that instantiate and set properties of the listview grid. I dragged a 3rd party grid control onto the design canvas. The grid control's DLLs are resources to my C# project. What would cause NETDEFGEN to error out on the event handler DLL when the grid control is on the canvas, but to generate it when the control is NOT on the canvas? Everything else in my project stayed exactly the same for this test.