<?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 Visual Basic Arc Objects program compiles clean but give window &amp;quot;Initialization Error&amp;quot; with message The runtime application type must be specified before license initialization. How is that done? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/visual-basic-arc-objects-program-compiles-clean/m-p/72617#M1950</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm converting the VB program from Visual Studio 2008 to VS 2013 and from ArcMap 10.0 to 10.5. I got the program to compile clean but get the "Initialziation Error" when attempt to run. I'm running Windows 10 and dotnet 4.5 is specified.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 07 Jan 2018 19:04:24 GMT</pubDate>
    <dc:creator>ThomasDanninger</dc:creator>
    <dc:date>2018-01-07T19:04:24Z</dc:date>
    <item>
      <title>Visual Basic Arc Objects program compiles clean but give window "Initialization Error" with message The runtime application type must be specified before license initialization. How is that done?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/visual-basic-arc-objects-program-compiles-clean/m-p/72617#M1950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm converting the VB program from Visual Studio 2008 to VS 2013 and from ArcMap 10.0 to 10.5. I got the program to compile clean but get the "Initialziation Error" when attempt to run. I'm running Windows 10 and dotnet 4.5 is specified.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Jan 2018 19:04:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/visual-basic-arc-objects-program-compiles-clean/m-p/72617#M1950</guid>
      <dc:creator>ThomasDanninger</dc:creator>
      <dc:date>2018-01-07T19:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Visual Basic Arc Objects program compiles clean but give window "Initialization Error" with message The runtime application type must be specified before license initialization. How is that done?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/visual-basic-arc-objects-program-compiles-clean/m-p/72618#M1951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure you have&amp;nbsp;Bind Method &lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;PRE&gt;ESRI.ArcGIS.RuntimeManager.Bind before license code. &lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jan 2018 05:47:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/visual-basic-arc-objects-program-compiles-clean/m-p/72618#M1951</guid>
      <dc:creator>ModyBuchbinder</dc:creator>
      <dc:date>2018-01-08T05:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: Visual Basic Arc Objects program compiles clean but give window "Initialization Error" with message The runtime application type must be specified before license initialization. How is that done?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/visual-basic-arc-objects-program-compiles-clean/m-p/72619#M1952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Mody.&amp;nbsp; I already had the following in before any calls to ArcObjects:&lt;/P&gt;&lt;P&gt;..&amp;nbsp;&lt;/P&gt;&lt;P&gt;If Not RuntimeManager.Bind(ProductCode.Desktop) Then&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; MessageBox.Show("Could not bind to Desktop")&lt;BR /&gt; End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not get the message box.&amp;nbsp; The software runs until the first call to an ArcObject after this "If" statement then I get the Initialization-error box?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A bit more info might help:&lt;/P&gt;&lt;P&gt;The ArcObjects call routine that produces the initialization error window and no exception is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pBaseDEMFac = New RasterWorkspaceFactory&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pBaseDEMRW = pBaseDEMFac.OpenFromFile(System.IO.Path.GetDirectoryName(strBaseDEM), 0)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pBaseDEMDataset3 = pBaseDEMRW.OpenRasterDataset(System.IO.Path.GetFileName(strBaseDEM))&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'&amp;nbsp;&amp;nbsp;Got it open so write it to registry...&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;My.Computer.Registry.SetValue("HKEY_CURRENT_USER\SOFTWARE\Civil War\Hidden Height", "BaseRaster", strBaseDEM)&lt;/P&gt;&lt;P&gt;Catch ex As Exception&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If (MessageBox.Show("Unable to open Input Base DEM raster. Need additional help?", "Hidden Height", MessageBoxButtons.YesNo, MessageBoxIcon.Error)) = Windows.Forms.DialogResult.Yes &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Then&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;frmDiaExtraHelp.rtfExtraHelp.Text = strOpenError&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;frmDiaExtraHelp.ShowDialog()&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;BR /&gt; End Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I skip around the above Try to the next ArcObject I do get an exception&amp;nbsp;but no initialization error box:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pSFFactory = New ShapefileWorkspaceFactory&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'strShapeDir = System.IO.Path.GetDirectoryName(strShape)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pSFFeatureWorkspace = pSFFactory.OpenFromFile(System.IO.Path.GetDirectoryName(strShape), 0)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strTestDir = System.IO.Path.GetDirectoryName(strShape)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pShapeFile = pSFFeatureWorkspace.OpenFeatureClass(System.IO.Path.GetFileName(strShape))&lt;/P&gt;&lt;P&gt;Catch ex As Exception&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If (MessageBox.Show("Unable to open Input observation points Shapefile. Need additional help?", "Hidden Height", MessageBoxButtons.YesNo, MessageBoxIcon.Error)) = &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Windows.Forms.DialogResult.Yes Then&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;frmDiaExtraHelp.rtfExtraHelp.Text = strOpenError&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;frmDiaExtraHelp.ShowDialog()&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit Sub&lt;BR /&gt; End Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used model builder to test a raster copy tool from the toolbox and that worked just fine.&amp;nbsp; So, I'm obviously missing something in converting the VB software&amp;nbsp;since it worked just fine in my old versions of both Visual Studio and ArcMap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Took me a few days but I finally figured out what the simple "Initialization Error" windows was trying to tell me.&amp;nbsp; When I added licence checking there was a second screen that I neglected to add a check mark indicating my selection of a basic, standard or advanced (as I remember) application.&amp;nbsp; I clicked on advanced and it took off executing several arobjects before failing on a geoprocessing call of Extract raster by mask.&amp;nbsp; &amp;nbsp;I'll work on that now..&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jan 2018 15:17:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/visual-basic-arc-objects-program-compiles-clean/m-p/72619#M1952</guid>
      <dc:creator>ThomasDanninger</dc:creator>
      <dc:date>2018-01-08T15:17:52Z</dc:date>
    </item>
  </channel>
</rss>

