<?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 How to interact with System.Drawing in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-interact-with-system-drawing/m-p/1516206#M11937</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;From my add-in I have always had this code that could save a graph (Bitmap) from a WPF form to a png file. Now I have moved my codebase to a 3.0.36057, now any code that has anything to with System.Drawing throws an exception, saying that the dll for System.Drawing is missing. It's not its there - it compiles and everything is fine - just like it was for earlier versions of my add-in.&lt;/P&gt;&lt;P&gt;So, I believe this dll is not thread-safe so I tried to implement the code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;FrameworkApplication.Current.Dispatcher.Invoke(() =&amp;gt;
{
    Bitmap myBitmap = null;
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't get it to work at all. Can any help me out to understand how I can get this to run.&amp;nbsp; I've spent 2 days on this now and I'm getting pretty frustrated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the exception is thrown:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;"Could not load file or assembly 'System.Drawing.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.":"System.Drawing.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Aug 2024 16:49:49 GMT</pubDate>
    <dc:creator>Vidar</dc:creator>
    <dc:date>2024-08-07T16:49:49Z</dc:date>
    <item>
      <title>How to interact with System.Drawing</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-interact-with-system-drawing/m-p/1516206#M11937</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;From my add-in I have always had this code that could save a graph (Bitmap) from a WPF form to a png file. Now I have moved my codebase to a 3.0.36057, now any code that has anything to with System.Drawing throws an exception, saying that the dll for System.Drawing is missing. It's not its there - it compiles and everything is fine - just like it was for earlier versions of my add-in.&lt;/P&gt;&lt;P&gt;So, I believe this dll is not thread-safe so I tried to implement the code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;FrameworkApplication.Current.Dispatcher.Invoke(() =&amp;gt;
{
    Bitmap myBitmap = null;
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't get it to work at all. Can any help me out to understand how I can get this to run.&amp;nbsp; I've spent 2 days on this now and I'm getting pretty frustrated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the exception is thrown:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;"Could not load file or assembly 'System.Drawing.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.":"System.Drawing.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 16:49:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-interact-with-system-drawing/m-p/1516206#M11937</guid>
      <dc:creator>Vidar</dc:creator>
      <dc:date>2024-08-07T16:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to interact with System.Drawing</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-interact-with-system-drawing/m-p/1516271#M11938</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/332020"&gt;@Vidar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have the&amp;nbsp;System.Drawing.Common NuGet referenced in your addin?&lt;/P&gt;&lt;P&gt;When you migrate to Pro 3.0, some of the 3rd party references you had should be moved to their NuGets.&lt;/P&gt;&lt;P&gt;Refer to this wiki for more info: &lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-3.0-Migration-Guide" target="_self"&gt;ProConcepts: 3.0-Migration-Guide&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;More info:&lt;/P&gt;&lt;P&gt;Bitmap&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is part of&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;System.Drawing&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;which was included in .Net Framework.&lt;/P&gt;&lt;P&gt;It is no longer included with .net core (6.0 or 8.0) and must be added manually.&lt;/P&gt;&lt;P&gt;Install the Nuget package&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;System.Drawing.Common&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;by right-clicking on your project in visual studio and choosing&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Manage Nuget Packages&lt;/P&gt;&lt;P&gt;In the Nuget Package manager, click on the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Browse Tab, search for&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;System.Drawing.Common&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in the top and it should be the first Package, official by Microsoft.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 20:22:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-interact-with-system-drawing/m-p/1516271#M11938</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2024-08-07T20:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to interact with System.Drawing</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-interact-with-system-drawing/m-p/1516548#M11940</link>
      <description>&lt;P&gt;Hi Uma,&lt;/P&gt;&lt;P&gt;Yes I have used the Nuget Package Manager to install System.Drawing.Common. Indeed I made a brand new add-in project and included this package into it. Still the same issue - I'm starting to believe there is some incompatibility going on here. At the moment, as of writing this - I am trying to achieve everything I can with core.&lt;/P&gt;&lt;P&gt;Small update - I think I was missing the&amp;nbsp;&lt;SPAN&gt;Windows Compatibility Pack - I have installed this as directed from the ESRI help you provided a link for.&amp;nbsp; Sadly this has introduced new errors into my add-in that is causing similar error messages, but this time for:&amp;nbsp;System.Configuration.ConfigurationManager 8.0.0.&amp;nbsp; So I installed the version it wanted from Nuget and it STILL says it can't find it.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Further update - it seems you cannot use the old fashioned Properties file in .net6 projects - so this code is obsolete now as far as I can tell:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Properties.Settings.Default.CurrentGroupId = null;&lt;BR /&gt;Properties.Settings.Default.Save();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm getting so frustrated with this - it's almost impossible to fix my add-in and I need to get this fixed in the next week as it's due for delivery to clients. So stressful - if you can help that would be great.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 15:38:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-interact-with-system-drawing/m-p/1516548#M11940</guid>
      <dc:creator>Vidar</dc:creator>
      <dc:date>2024-08-08T15:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to interact with System.Drawing</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-interact-with-system-drawing/m-p/1518565#M11952</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/332020"&gt;@Vidar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please check the version of &lt;SPAN&gt;System.Configuration.ConfigurationManager that ArcGIS Pro is loading while running your addin?&amp;nbsp; You can see this version from within Visual Studio while you are debugging the addin.&amp;nbsp; See screenshot below. Sort on the Name column.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The version of the System.Configuration.ConfigurationsManager NuGet you are referencing in your addin should match the version that ArcGIS Pro needs.&amp;nbsp; &lt;A href="https://community.esri.com/t5/arcgis-pro-sdk-questions/error-migrating-existing-2-x-addin-to-3-1-x-could/m-p/1336787#M10528" target="_self"&gt;Check out this post on Esri Community&lt;/A&gt; - a very similar issue to yours was posted here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="UmaHarano_0-1723490087487.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/112177i3C5CC2CDBE3CB1D6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="UmaHarano_0-1723490087487.png" alt="UmaHarano_0-1723490087487.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 19:17:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-interact-with-system-drawing/m-p/1518565#M11952</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2024-08-12T19:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to interact with System.Drawing</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-interact-with-system-drawing/m-p/1522972#M11965</link>
      <description>&lt;P&gt;This appears to be the issue - so I have installed version 8.0. Nuget packages of what it thought was missing - however it needed version 6.0 - as the Module window (can only be seen when debugging) shows that version 6.0.x seems to be the versions of dlls Pro is using under the hood.&lt;/P&gt;&lt;P&gt;Uma, do you think its worth ESRI updating the migration docs with this in mind - as I'm sure I won't be the only one who is loading up the wrong version Nuget packages here?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 15:51:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-interact-with-system-drawing/m-p/1522972#M11965</guid>
      <dc:creator>Vidar</dc:creator>
      <dc:date>2024-08-16T15:51:03Z</dc:date>
    </item>
  </channel>
</rss>

