I have an ArcGIS Engine 10.1 app. It has been running fine. It opens an .mxd on initialization. The .mxd contains 3 feature classes that have class extensions applied.
I just tried to make a change to the app for the first time in years and now I cannot get the app to load the .mxd.
The .mxd can be opened in ArcMap without a problem so I know the class extensions are installed fine on the machine. But when the ArcGIS Engine app loads it crashes without error or warning as soon as it loads the .mxd.
If I remove the map layers from the .mxd that have the class extensions then it opens fine.
If I add the class extension library as a project reference and also have the class extension project open in visual studio I can step through the class extension code. What I see is the New sub being called and the module level variable being set, Once it gets to the end of the sub the ArcEngine app crashes, it doesn't call the New Sub on the next feature class in the map service.
Public Sub New() MyBase.New() End Sub 'Crash after this line
I've just noticed an error being recorded in the output window aftwer the crash. When the app crashes after loading the first class extension the error
Unlicensed ARC session - terminating!
Is recorded in the Output window. The ArcEngine app successfully binds to a runtime and I successfully initialize a license with AoInitialize so not why this error is being thrown.