<?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 Re: ArcGIS Pro SDK unit testing fails to open project in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-sdk-unit-testing-fails-to-open-project/m-p/1537420#M12081</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/818028"&gt;@JoePolaski&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does your unit test code for OpenAsync look similar to this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;// Open existing project
      Project project = null;
      try
      {
        project = await Project.OpenAsync("project path");
      }
      catch (Exception ex)
      {
        // exception
      }&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 11 Sep 2024 16:34:15 GMT</pubDate>
    <dc:creator>UmaHarano</dc:creator>
    <dc:date>2024-09-11T16:34:15Z</dc:date>
    <item>
      <title>ArcGIS Pro SDK unit testing fails to open project</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-sdk-unit-testing-fails-to-open-project/m-p/1535997#M12061</link>
      <description>&lt;P&gt;I am trying to set up some unit tests for an add-in I am working on.&amp;nbsp; I have followed the&amp;nbsp;&lt;A href="https://github.com/esri/arcgis-pro-sdk/wiki/ProGuide-Regression-Testing" target="_self"&gt;Esri Documentation&lt;/A&gt;&amp;nbsp;to a T and everything compiles totally fine. The problem seems to lie in ClassInitialize function provided in the guide where it calls Project.OpenAsync(@"{insert project path here}").&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;When I run my unit tests they always fail at this line and the error says that it is unable to open the project. I am certain that there is a valid project at the path I am giving it. Pro will open the project just fine if I open the project from within pro. The even stranger thing is, if I debug and manually walk through the unit tests as they are executing, the error doesn't happen and the tests pass. But only when I am using the debugger. If I run them normally they will fail every time.&lt;BR /&gt;&lt;BR /&gt;Has anyone else encountered a similar issue while unit testing? I can't seem to find much on this and the things I have tried, have not worked.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 17:25:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-sdk-unit-testing-fails-to-open-project/m-p/1535997#M12061</guid>
      <dc:creator>JoePolaski</dc:creator>
      <dc:date>2024-09-06T17:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro SDK unit testing fails to open project</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-sdk-unit-testing-fails-to-open-project/m-p/1537420#M12081</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/818028"&gt;@JoePolaski&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does your unit test code for OpenAsync look similar to this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;// Open existing project
      Project project = null;
      try
      {
        project = await Project.OpenAsync("project path");
      }
      catch (Exception ex)
      {
        // exception
      }&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 11 Sep 2024 16:34:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-sdk-unit-testing-fails-to-open-project/m-p/1537420#M12081</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2024-09-11T16:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro SDK unit testing fails to open project</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-sdk-unit-testing-fails-to-open-project/m-p/1537448#M12083</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/9021"&gt;@UmaHarano&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Thank you for responding. Yes it does, but I did end up resolving the issue. I had thought my named user license was authorized for offline work and turns out it was not (my organization had it disabled globally). So, by correcting that I was able to resolve the issue. I wasn't sure how to mark this as solved.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2024 17:37:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-sdk-unit-testing-fails-to-open-project/m-p/1537448#M12083</guid>
      <dc:creator>JoePolaski</dc:creator>
      <dc:date>2024-09-11T17:37:33Z</dc:date>
    </item>
  </channel>
</rss>

