<?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: Support multiple version of esri SDK in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/support-multiple-version-of-esri-sdk/m-p/1290707#M11837</link>
    <description>&lt;P&gt;You can do that, but it will _have_ to be two separate builds, or your class library _must_ target 100.5 (and only use 100.5 APIs), and a 100.15 _app_ can reference that library.&lt;BR /&gt;&lt;BR /&gt;If you want to access 100.15 APIs in your class library, you must reference 100.15, but that would mean any app trying to use that library must reference 100.15+ as well.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 May 2023 16:58:28 GMT</pubDate>
    <dc:creator>dotMorten_esri</dc:creator>
    <dc:date>2023-05-18T16:58:28Z</dc:date>
    <item>
      <title>Support multiple version of esri SDK</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/support-multiple-version-of-esri-sdk/m-p/1290008#M11834</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;currently we are using 100.05 and we want upgrade to 100.15&lt;BR /&gt;&lt;BR /&gt;but our problem that some of the projects have to stay in 100.05&lt;BR /&gt;therefore we have to support both version in the same project(we dont to create a different branch for each version)&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;we found out that for our needed everything work in both versions without changing anything&lt;BR /&gt;except for labels, and to be more specific the where clause&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I found out &lt;A href="https://community.esri.com/t5/arcgis-maps-sdks-native-blog/label-features-the-easy-way/ba-p/886207" target="_self"&gt;this guide&amp;nbsp;&lt;/A&gt;&amp;nbsp;and it works just fine&lt;BR /&gt;but the one problem i found is there's difference in how to set the expression&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;private string expression = "expression"
var labelInfo = new LabelClassInfo(....); //acording to the guide

if(GetVersion() == "100.15.00")
 labelInfo.ArcadeExpression = $"$feature.{expression}";
else if if(GetVersion() == "100.5.00")
 labelInfo.TextExpression = $"[{expression}]";&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this seems to work fine&amp;nbsp;for both versions&lt;BR /&gt;my question is if there's a cleaner way to do it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT: this seems to also work just fine for both versions&lt;/P&gt;&lt;LI-CODE lang="c"&gt;labelInfo.ArcadeExpression = $"$feature.{expression}";
labelInfo.TextExpression = $"[{expression}]";&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 09:51:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/support-multiple-version-of-esri-sdk/m-p/1290008#M11834</guid>
      <dc:creator>ofirrosner</dc:creator>
      <dc:date>2023-05-17T09:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Support multiple version of esri SDK</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/support-multiple-version-of-esri-sdk/m-p/1290200#M11835</link>
      <description>&lt;P&gt;You can use preprocessor constants to do this. In a project's csproj you'd add a new constant to a PropertyGroup:&lt;BR /&gt;&amp;lt;DefineConstants&amp;gt;$(DefineConstants);ARCGISRUNTIME_100_15&amp;lt;/DefineConstants&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Then in code you can do&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;#if ARCGISRUNTIME_100_15
 labelInfo.ArcadeExpression = $"$feature.{expression}";
#else
 labelInfo.TextExpression = $"[{expression}]";
#endif&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However you won't be able to compile it into one class library and reuse it, since you can't make this check at runtime. So you'd have to use a shared project or linked file into the project that references the constant.&lt;BR /&gt;&lt;BR /&gt;You'd have to reference 100.15 to write code that access both the new and old properties, but that means a 100.5 project won't be able to reference that project, since it is built with a newer library.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 17:26:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/support-multiple-version-of-esri-sdk/m-p/1290200#M11835</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2023-05-17T17:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Support multiple version of esri SDK</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/support-multiple-version-of-esri-sdk/m-p/1290538#M11836</link>
      <description>&lt;P&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Just to clarify , i don't to support&amp;nbsp;100.15 &lt;STRONG&gt;and&lt;/STRONG&gt; 100.5 i want to support&amp;nbsp;&amp;nbsp;100.15 &lt;STRONG&gt;or&lt;/STRONG&gt;100.5 with the same code base&lt;BR /&gt;i have a map project that currently uses 100.5, this project is injected via a dll to alot of other project(that belong to different clients)&lt;BR /&gt;for one of the projects(clients) we want to upgrade 100.15, and for the rest leave it as is&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 05:03:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/support-multiple-version-of-esri-sdk/m-p/1290538#M11836</guid>
      <dc:creator>ofirrosner</dc:creator>
      <dc:date>2023-05-18T05:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: Support multiple version of esri SDK</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/support-multiple-version-of-esri-sdk/m-p/1290707#M11837</link>
      <description>&lt;P&gt;You can do that, but it will _have_ to be two separate builds, or your class library _must_ target 100.5 (and only use 100.5 APIs), and a 100.15 _app_ can reference that library.&lt;BR /&gt;&lt;BR /&gt;If you want to access 100.15 APIs in your class library, you must reference 100.15, but that would mean any app trying to use that library must reference 100.15+ as well.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 16:58:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/support-multiple-version-of-esri-sdk/m-p/1290707#M11837</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2023-05-18T16:58:28Z</dc:date>
    </item>
  </channel>
</rss>

