<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic &amp;amp;quot;ArcGIS version not specified.&amp;amp;quot; (Though it seems to be.) in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/amp-quot-arcgis-version-not-specified-amp-quot/m-p/680882#M18301</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am having some trouble with the RuntimeManager in the ArcGIS 10.0 beta. I persistently (though not consistently) get an exception at this point in my code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;// Before executing the offending line, I do this to "bind to an ArcGIS version".&amp;nbsp; 
// (In this example I use Engine, but I have the same problem if I use Server).
RuntimeManager.Bind(ProductCode.Engine);
// (These are the variables I'm working with...)
esriLicenseStatus licenseStatus;
private IAoInitialize m_AoInitialize = new AoInitializeClass();
esriLicenseProductCode productCode;
// This line is where I get the exception...
licenseStatus = m_AoInitialize.IsProductCodeAvailable(productCode);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// And here are the exception details...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;System.Runtime.InteropServices.COMException occurred&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Message="ArcGIS version not specified. You must first bind to an ArcGIS version prior to using any ArcGIS components."&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Source="esriSystem.AoInitialize"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ErrorCode=-2147221002&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;StackTrace:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at ESRI.ArcGIS.esriSystem.AoInitializeClass.IsProduct CodeAvailable(esriLicenseProductCode ProductCode)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at Bbsi.ArcObjects.Bs.AoLicenseInitializer.CheckOutPr oduct(esriLicenseProductCode productCode) in &amp;lt;my code file&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;InnerException:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My machine does have valid Engine and Server licenses.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The peculiar part is that I don't see this exception every single time. I happens most of the time; but without my changing anything, it some times does not. I have flailed at it by changing the product code I pass to RuntimeManager.Bind() from Engine to Server, placing breakpoints and waiting a few seconds between calling RuntimeManager.Bind() and calling IsProductCodeAvailable(), but I have yet to determine with certainty how to make it succeed or fail reliably. When the exception is not thrown, the application behaves normally.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I place a break point before the offending line of code and inspect the RuntimeManager's ActiveRuntime property, it looks as though it's ready to go (so far as I can tell, anyway):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ESRI.ArcGIS.RuntimeManager.ActiveRuntime&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{ESRI.ArcGIS.RuntimeInfo}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Path: "C:\\Program Files\\ArcGIS\\Engine10.0\\"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Product: Engine&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Version: "10.0"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using C# and Visual Studio 2008 on Windows 7 (32-bit) and had no similar problem with this application when I built it against 9.3. In fact, the only difference between the version built against 9.3 and this one is the call to RuntimeManager.Bind(), which I understand is a new convention in 10.0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would greatly appreciate any advice I can get.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Apr 2010 17:27:53 GMT</pubDate>
    <dc:creator>patblair</dc:creator>
    <dc:date>2010-04-23T17:27:53Z</dc:date>
    <item>
      <title>&amp;quot;ArcGIS version not specified.&amp;quot; (Though it seems to be.)</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/amp-quot-arcgis-version-not-specified-amp-quot/m-p/680882#M18301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am having some trouble with the RuntimeManager in the ArcGIS 10.0 beta. I persistently (though not consistently) get an exception at this point in my code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;// Before executing the offending line, I do this to "bind to an ArcGIS version".&amp;nbsp; 
// (In this example I use Engine, but I have the same problem if I use Server).
RuntimeManager.Bind(ProductCode.Engine);
// (These are the variables I'm working with...)
esriLicenseStatus licenseStatus;
private IAoInitialize m_AoInitialize = new AoInitializeClass();
esriLicenseProductCode productCode;
// This line is where I get the exception...
licenseStatus = m_AoInitialize.IsProductCodeAvailable(productCode);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// And here are the exception details...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;System.Runtime.InteropServices.COMException occurred&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Message="ArcGIS version not specified. You must first bind to an ArcGIS version prior to using any ArcGIS components."&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Source="esriSystem.AoInitialize"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ErrorCode=-2147221002&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;StackTrace:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at ESRI.ArcGIS.esriSystem.AoInitializeClass.IsProduct CodeAvailable(esriLicenseProductCode ProductCode)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at Bbsi.ArcObjects.Bs.AoLicenseInitializer.CheckOutPr oduct(esriLicenseProductCode productCode) in &amp;lt;my code file&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;InnerException:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My machine does have valid Engine and Server licenses.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The peculiar part is that I don't see this exception every single time. I happens most of the time; but without my changing anything, it some times does not. I have flailed at it by changing the product code I pass to RuntimeManager.Bind() from Engine to Server, placing breakpoints and waiting a few seconds between calling RuntimeManager.Bind() and calling IsProductCodeAvailable(), but I have yet to determine with certainty how to make it succeed or fail reliably. When the exception is not thrown, the application behaves normally.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I place a break point before the offending line of code and inspect the RuntimeManager's ActiveRuntime property, it looks as though it's ready to go (so far as I can tell, anyway):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ESRI.ArcGIS.RuntimeManager.ActiveRuntime&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{ESRI.ArcGIS.RuntimeInfo}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Path: "C:\\Program Files\\ArcGIS\\Engine10.0\\"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Product: Engine&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Version: "10.0"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using C# and Visual Studio 2008 on Windows 7 (32-bit) and had no similar problem with this application when I built it against 9.3. In fact, the only difference between the version built against 9.3 and this one is the call to RuntimeManager.Bind(), which I understand is a new convention in 10.0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would greatly appreciate any advice I can get.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Apr 2010 17:27:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/amp-quot-arcgis-version-not-specified-amp-quot/m-p/680882#M18301</guid>
      <dc:creator>patblair</dc:creator>
      <dc:date>2010-04-23T17:27:53Z</dc:date>
    </item>
    <item>
      <title>"ArcGIS version not specified." (Though it seems to be.)</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/amp-quot-arcgis-version-not-specified-amp-quot/m-p/680883#M18302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Not too long after I posted this message, I found an explanation for the behavior I described.&amp;nbsp; I was, indeed, initializing an ArcObjects class as a private member of my class before calling RuntimeManager.Bind().&amp;nbsp; That initialization didn't throw an exception; but by creating it after calling RuntimeManager.Bind(), I no longer seem to see the problem mentioned in my post.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Apr 2010 18:05:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/amp-quot-arcgis-version-not-specified-amp-quot/m-p/680883#M18302</guid>
      <dc:creator>patblair</dc:creator>
      <dc:date>2010-04-23T18:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: "ArcGIS version not specified." (Though it seems to be.)</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/amp-quot-arcgis-version-not-specified-amp-quot/m-p/680884#M18303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Not too long after I posted this message, I found an explanation for the behavior I described.&amp;nbsp; I was, indeed, initializing an ArcObjects class as a private member of my class before calling RuntimeManager.Bind().&amp;nbsp; That initialization didn't throw an exception; but by creating it after calling RuntimeManager.Bind(), I no longer seem to see the problem mentioned in my post.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;hi patbullberry,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;eventho this thread was created long time ago, may i know where to call the runtimemanager.bind?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i have the same problem, where this exception occurs when i execute my project. some how, i've called runtimemanager.bind() in my sub form and it was ok. but when i compile the whole project, the exception appeared again in my main form.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;really appreciate your feed back &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2011 07:10:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/amp-quot-arcgis-version-not-specified-amp-quot/m-p/680884#M18303</guid>
      <dc:creator>Wan_NurAkmal</dc:creator>
      <dc:date>2011-11-21T07:10:43Z</dc:date>
    </item>
  </channel>
</rss>

