<?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;quot;The selected layer file is not valid&amp;quot; error when attempting to open a layer file from a network folder in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/quot-the-selected-layer-file-is-not-valid-quot/m-p/800871#M1968</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've noticed that sometimes I get a System.ArgumentException when attempting to add a layer at this line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="line-numbers language-csharp"&gt;&lt;CODE&gt;LayerFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;CreateLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Uri&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;uri&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="369381" alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/369381_1.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var 'uri' is a string containing the full path of a .lyrx file (ex: "D:\Data\my_layer.lyrx").&amp;nbsp; If the path is on a shared network drive, some of the time I get the exception.&amp;nbsp; I'm also unable to navigate to that folder in the ArcGIS Pro Catalog.&amp;nbsp; Sometime it does work, however but it seems random.&amp;nbsp; There is no loss of connection to the folder in Windows Explorer when this error occurs.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to force a refresh or reconnect to the network folder before attempting to access files?&amp;nbsp; Has anyone else experienced a similar issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Aug 2017 18:30:15 GMT</pubDate>
    <dc:creator>mfcallahan</dc:creator>
    <dc:date>2017-08-31T18:30:15Z</dc:date>
    <item>
      <title>"The selected layer file is not valid" error when attempting to open a layer file from a network folder</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/quot-the-selected-layer-file-is-not-valid-quot/m-p/800871#M1968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've noticed that sometimes I get a System.ArgumentException when attempting to add a layer at this line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="line-numbers language-csharp"&gt;&lt;CODE&gt;LayerFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;CreateLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Uri&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;uri&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="369381" alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/369381_1.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var 'uri' is a string containing the full path of a .lyrx file (ex: "D:\Data\my_layer.lyrx").&amp;nbsp; If the path is on a shared network drive, some of the time I get the exception.&amp;nbsp; I'm also unable to navigate to that folder in the ArcGIS Pro Catalog.&amp;nbsp; Sometime it does work, however but it seems random.&amp;nbsp; There is no loss of connection to the folder in Windows Explorer when this error occurs.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to force a refresh or reconnect to the network folder before attempting to access files?&amp;nbsp; Has anyone else experienced a similar issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2017 18:30:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/quot-the-selected-layer-file-is-not-valid-quot/m-p/800871#M1968</guid>
      <dc:creator>mfcallahan</dc:creator>
      <dc:date>2017-08-31T18:30:15Z</dc:date>
    </item>
  </channel>
</rss>

