I have written an ArcEngine application using vb.net and Visual Studio 2010. When I initially started the code, I indicated an ArcInfo license was available during the project setup. This worked fine for a while, and then one day for no apparent reason it stopped...but at the time I didn't need ArcInfo, I just needed ArcView, so I changed the LicenseInitializer to use ArcView and it kept on working, so I didn't give it any thought. (How I wish I'd written down what might have changed!)
Now I do need ArcInfo for what I'm trying to do, and I've tried changing the requested license back using the Project->Add ArcGIS License Checking tool just in case I accidentally messed something up, but it won't work.
What is particularly confusing is that the error message I'm getting says ArcInfo isn't initialized, but then if you scroll down, it says it is (see image). Note that I'm not trying to use any of the extensions, just ArcInfo itself.
I've stepped through the code, and the InitializeApplication function on the Startup handler (code below) returns true. The error occurs when my form with an embedded AxMapControl actually attempts to use the license (BeginInit method on AxMapControl).
Private Sub MyApplication_Startup(sender As Object, e As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs) Handles Me.Startup
'ESRI License Initializer generated code.
m_AOLicenseInitializer.InitializeApplication(New esriLicenseProductCode() {esriLicenseProductCode.esriLicenseProductCodeArcInfo}, _
New esriLicenseExtensionCode() {})
End Sub
I know that I have an ArcInfo license on this computer, and now that I've regenerated the license for my code with the License Checking Tool I'm confident I haven't messed with any normally hidden files I shouldn't be touching. Any ideas as to what might be causing this error??
No comments:
Post a Comment