<?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 Add-ins: Runtime method-not-found error when sharing a class library between two modules in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-add-ins-runtime-method-not-found-error/m-p/1631404#M13034</link>
    <description>&lt;P&gt;Please note that the original CommonClassLibraryTest.zip attachment in the main post is outdated.&lt;BR /&gt;The correct version is attached in the second reply below.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Jul 2025 01:21:40 GMT</pubDate>
    <dc:creator>rdc_hirohara</dc:creator>
    <dc:date>2025-07-09T01:21:40Z</dc:date>
    <item>
      <title>ArcGIS Pro Add-ins: Runtime method-not-found error when sharing a class library between two modules</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-add-ins-runtime-method-not-found-error/m-p/1630931#M13029</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I’m developing an ArcGIS Pro SDK for .NET add-in, and I’m encountering a runtime issue when sharing a class library between two module add-ins.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Project Structure:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ClassLibrary1: a shared class library&lt;/LI&gt;&lt;LI&gt;ProAppModule1: references ClassLibrary1&lt;/LI&gt;&lt;LI&gt;ProAppModule2: also references ClassLibrary1&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Steps to reproduce:&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Add only Method1 to ClassLibrary1 and build all projects.&lt;/LI&gt;&lt;LI&gt;Implement ProAppModule2 to call ClassLibrary1.Method1 from a button.&lt;/LI&gt;&lt;LI&gt;Add Method2 to ClassLibrary1, rebuild all projects.&lt;/LI&gt;&lt;LI&gt;Implement ProAppModule1 to call ClassLibrary1.Method2 from a different button.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;At runtime (inside ArcGIS Pro):&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Pressing the button in ProAppModule2 (which calls Method1) works fine.&lt;/LI&gt;&lt;LI&gt;Pressing the button in ProAppModule1 (which calls Method2) throws a MissingMethodException or similar, saying the method is not found.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;It seems that ClassLibrary1.dll from ProAppModule2 is always the one being loaded, even though ProAppModule1 has its own reference to the updated DLL.&lt;/P&gt;&lt;P&gt;This behavior occurs only when both add-ins are present. If only one add-in exists, everything works as expected.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt;&lt;BR /&gt;Is there a known issue or best practice for referencing a shared class library from multiple ArcGIS Pro Add-in modules?&lt;BR /&gt;How can I ensure that both add-ins use the correct and updated version of the shared assembly at runtime?&lt;BR /&gt;Is there a recommended way to isolate or unify shared library usage between add-ins?&lt;/P&gt;&lt;P&gt;Any advice would be greatly appreciated. I've attached a minimal repro project (CommonClassLibraryTest.zip).&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jul 2025 01:26:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-add-ins-runtime-method-not-found-error/m-p/1630931#M13029</guid>
      <dc:creator>rdc_hirohara</dc:creator>
      <dc:date>2025-07-08T01:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro Add-ins: Runtime method-not-found error when sharing a class library between two modules</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-add-ins-runtime-method-not-found-error/m-p/1631302#M13031</link>
      <description>&lt;P&gt;I got it to work, needed a couple of changes:&lt;/P&gt;&lt;P&gt;- ProAppModule2 has a copy of the folder inside of itself (that makes the build fail). Just delete it. Probably a zipping oversight.&lt;/P&gt;&lt;P&gt;- For ProAppModule2 to work without a problem, add the ClassLibrary1 project to the&amp;nbsp;ProAppModule2 using the Add/Existing project, then in the&amp;nbsp;ProAppModule2 project dependencies add&amp;nbsp;ClassLibrary1 as a project (the same as it is in&amp;nbsp;ProAppModule1).&lt;BR /&gt;That way each esriAddinX will have its own copy of the compiled ClassLibrary1 as a DLL and will not have any conflict or problem loading it.&lt;/P&gt;&lt;P&gt;You probably don't need it but I'm attaching a Zip file of the fix for reference.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jul 2025 20:40:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-add-ins-runtime-method-not-found-error/m-p/1631302#M13031</guid>
      <dc:creator>SelimDissem</dc:creator>
      <dc:date>2025-07-08T20:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro Add-ins: Runtime method-not-found error when sharing a class library between two modules</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-add-ins-runtime-method-not-found-error/m-p/1631401#M13032</link>
      <description>&lt;P&gt;Thank you for taking the time to check the project and share your version.&lt;/P&gt;&lt;P&gt;However, it looks like the modified sample you posted doesn't use ClassLibrary1 at all — it just shows a message box directly from the button click handler. My original issue is specifically about what happens &lt;STRONG&gt;when both modules reference the same shared class library, and one of them tries to call a method that was newly added&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;The runtime error only occurs when:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Both add-in modules are present&lt;/LI&gt;&lt;LI&gt;ClassLibrary1 is updated to include a new method (e.g., Method2)&lt;/LI&gt;&lt;LI&gt;One module (e.g., ProAppModule1) tries to call the new method&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;It seems like &lt;STRONG&gt;only one version of the shared DLL is loaded at runtime&lt;/STRONG&gt;, and if it's the older one, the new method cannot be found.&lt;/P&gt;&lt;P&gt;Could you try testing the project as-is with those conditions? I’d really appreciate your insights if you’re able to reproduce the issue in that context.&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 00:50:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-add-ins-runtime-method-not-found-error/m-p/1631401#M13032</guid>
      <dc:creator>rdc_hirohara</dc:creator>
      <dc:date>2025-07-09T00:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro Add-ins: Runtime method-not-found error when sharing a class library between two modules</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-add-ins-runtime-method-not-found-error/m-p/1631403#M13033</link>
      <description>&lt;P&gt;Hi SelimDissem,&lt;/P&gt;&lt;P&gt;Thank you for taking the time to look into my issue.&lt;/P&gt;&lt;P&gt;I just realized that the original CommonClassLibraryTest.zip I uploaded might not have been in the correct state — it was missing the actual call to ClassLibrary1.Method2, which is essential to reproduce the runtime error.&lt;/P&gt;&lt;P&gt;I'm very sorry for the confusion this may have caused.&lt;BR /&gt;I've now updated the ZIP file with the correct version of the project that includes the added method and both modules referencing it properly.&lt;/P&gt;&lt;P&gt;Thank you again for your time and understanding. I really appreciate your support.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 01:18:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-add-ins-runtime-method-not-found-error/m-p/1631403#M13033</guid>
      <dc:creator>rdc_hirohara</dc:creator>
      <dc:date>2025-07-09T01:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro Add-ins: Runtime method-not-found error when sharing a class library between two modules</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-add-ins-runtime-method-not-found-error/m-p/1631404#M13034</link>
      <description>&lt;P&gt;Please note that the original CommonClassLibraryTest.zip attachment in the main post is outdated.&lt;BR /&gt;The correct version is attached in the second reply below.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 01:21:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-add-ins-runtime-method-not-found-error/m-p/1631404#M13034</guid>
      <dc:creator>rdc_hirohara</dc:creator>
      <dc:date>2025-07-09T01:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro Add-ins: Runtime method-not-found error when sharing a class library between two modules</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-add-ins-runtime-method-not-found-error/m-p/1631744#M13038</link>
      <description>&lt;P&gt;You have a couple of options:&lt;/P&gt;&lt;P&gt;- revise the need to have different versions of the same library/DLL shared across multiple add-ins. You could just have the latest referenced by all your add-ins and then only have one version loaded and shared by all the add-ins.&lt;/P&gt;&lt;P&gt;- if you do have a requirement for multiple versions of the same library to co-exist for different add-ins, you'll have to:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 1. give your library a strong name / sign it and version it so .NET can tell the various versions apart.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 2. enable side by side loading of add-ins as documented in&amp;nbsp;&lt;A href="https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Advanced-Topics#side-by-side-loading-to-resolve-addin-dependencies" target="_blank"&gt;ProConcepts Advanced Topics · Esri/arcgis-pro-sdk Wiki&lt;/A&gt;&amp;nbsp;(Pro 3.5+)&lt;/P&gt;&lt;P&gt;If you have to support a version of Pro prior to 3.5, the simplest solution is the first one (one version of the class library for all add-ins, deployed only once).&lt;/P&gt;&lt;P&gt;Hope this answers your question&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 18:34:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-add-ins-runtime-method-not-found-error/m-p/1631744#M13038</guid>
      <dc:creator>SelimDissem</dc:creator>
      <dc:date>2025-07-09T18:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro Add-ins: Runtime method-not-found error when sharing a class library between two modules</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-add-ins-runtime-method-not-found-error/m-p/1631757#M13039</link>
      <description>&lt;P&gt;The ArcGIS Pro SDK community samples repo contains an example of two Add-ins interfacing.&amp;nbsp; Under the Framework folder you'll find &lt;A href="https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework/AddInOne" target="_self"&gt;AddInOne&lt;/A&gt; and &lt;A href="https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework/AddInTwo" target="_self"&gt;AddInTwo&lt;/A&gt; and the shared component &lt;A href="https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework/AddInShared" target="_self"&gt;AddInShared.&lt;/A&gt;&lt;BR /&gt;If you have a reusable versioned class library, you'll have to sign the add-in (and library) as&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/263780"&gt;@SelimDissem&lt;/a&gt;&amp;nbsp; said above. If you just want to 'share' common source code between your two Add-ins you can also add a reference to your 'shared' CS source code as shown here (in which case, you don't need to worry about DLL versions):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Wolf_0-1752094046643.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/136243iBAD0BCD52B1C642D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Wolf_0-1752094046643.png" alt="Wolf_0-1752094046643.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 20:48:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-add-ins-runtime-method-not-found-error/m-p/1631757#M13039</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2025-07-09T20:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro Add-ins: Runtime method-not-found error when sharing a class library between two modules</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-add-ins-runtime-method-not-found-error/m-p/1631863#M13040</link>
      <description>&lt;P&gt;Thank you SelimDissem!&lt;BR /&gt;That’s exactly what I tried yesterday — I added a _ at the end of the assembly name (ClassLibrary1_), and it worked.&lt;BR /&gt;It's great to know this is a reproducible behavior and not just something on my setup.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 05:40:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-add-ins-runtime-method-not-found-error/m-p/1631863#M13040</guid>
      <dc:creator>rdc_hirohara</dc:creator>
      <dc:date>2025-07-10T05:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro Add-ins: Runtime method-not-found error when sharing a class library between two modules</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-add-ins-runtime-method-not-found-error/m-p/1631864#M13041</link>
      <description>&lt;P&gt;Thank you, Wolf — you're absolutely right.&lt;BR /&gt;I tried switching to a shared DLL (instead of embedding it via project references), and the problem is resolved when both add-ins refer to the same external DLL.&lt;/P&gt;&lt;P&gt;The challenge, of course, is in distributing that shared DLL: since it's not embedded in the .esriAddinX files, it has to be placed manually or via installer on all target machines.&lt;/P&gt;&lt;P&gt;In environments where we need to keep deployment simple — for example, by just distributing .esriAddinX files — this can become a bit of a maintenance concern.&lt;/P&gt;&lt;P&gt;That said, I completely agree that your approach is the cleanest and most robust solution in the long term. I may look into creating a small installer to bundle the shared DLL if the project grows.&lt;/P&gt;&lt;P&gt;Thanks again for the helpful insight!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 06:05:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-add-ins-runtime-method-not-found-error/m-p/1631864#M13041</guid>
      <dc:creator>rdc_hirohara</dc:creator>
      <dc:date>2025-07-10T06:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro Add-ins: Runtime method-not-found error when sharing a class library between two modules</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-add-ins-runtime-method-not-found-error/m-p/1631865#M13042</link>
      <description>&lt;P&gt;I also appreciate Wolf's insight — his suggestion is the cleanest long-term solution from a design perspective.&lt;BR /&gt;But I’ll accept SelimDissem’s answer since it directly solved the issue in the current setup.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 06:08:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-add-ins-runtime-method-not-found-error/m-p/1631865#M13042</guid>
      <dc:creator>rdc_hirohara</dc:creator>
      <dc:date>2025-07-10T06:08:22Z</dc:date>
    </item>
  </channel>
</rss>

