<?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 Is there a Dockerfile example somewhere? in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/is-there-a-dockerfile-example-somewhere/m-p/1180084#M11058</link>
    <description>&lt;P&gt;Hi -&lt;/P&gt;&lt;P&gt;When I run my app in a docker container I get this exception when I try to set the APIKey:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Could not load ArcGIS Runtime (RuntimeCoreNet100_14.dll) or one of its dependencies. Ensure "Microsoft Visual C++ 2015-2019 Redistributable" is installed.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I've copied in all the dlls from&amp;nbsp;C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Redist\MSVC\14.29.30133\onecore\x64\Microsoft.VC142.CRT&amp;nbsp; into the container, but still get same result.&lt;/P&gt;&lt;P&gt;Also tried by installing the chocolatey &lt;A href="https://community.chocolatey.org/packages/vcredist-all" target="_self"&gt;vcredist-all&lt;/A&gt; package, same result.&lt;/P&gt;&lt;P&gt;Thanks, Kirk&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jun 2022 03:32:55 GMT</pubDate>
    <dc:creator>KirkKuykendall1</dc:creator>
    <dc:date>2022-06-06T03:32:55Z</dc:date>
    <item>
      <title>Is there a Dockerfile example somewhere?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/is-there-a-dockerfile-example-somewhere/m-p/1180084#M11058</link>
      <description>&lt;P&gt;Hi -&lt;/P&gt;&lt;P&gt;When I run my app in a docker container I get this exception when I try to set the APIKey:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Could not load ArcGIS Runtime (RuntimeCoreNet100_14.dll) or one of its dependencies. Ensure "Microsoft Visual C++ 2015-2019 Redistributable" is installed.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I've copied in all the dlls from&amp;nbsp;C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Redist\MSVC\14.29.30133\onecore\x64\Microsoft.VC142.CRT&amp;nbsp; into the container, but still get same result.&lt;/P&gt;&lt;P&gt;Also tried by installing the chocolatey &lt;A href="https://community.chocolatey.org/packages/vcredist-all" target="_self"&gt;vcredist-all&lt;/A&gt; package, same result.&lt;/P&gt;&lt;P&gt;Thanks, Kirk&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 03:32:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/is-there-a-dockerfile-example-somewhere/m-p/1180084#M11058</guid>
      <dc:creator>KirkKuykendall1</dc:creator>
      <dc:date>2022-06-06T03:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a Dockerfile example somewhere?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/is-there-a-dockerfile-example-somewhere/m-p/1180268#M11059</link>
      <description>&lt;P&gt;"Ensure "Microsoft Visual C++ 2015-2019 Redistributable" is installed." is our best guess at what went wrong during initialization - often this is the cause of this specific issue.&lt;/P&gt;&lt;P&gt;Can you share more information about:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;What application framework/platform you're targeting?&lt;/LI&gt;&lt;LI&gt;Your application bin/output folder structure?&lt;/LI&gt;&lt;LI&gt;The list of VC++ redist dlls you have copied to the&amp;nbsp;bin/output folder?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 16:19:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/is-there-a-dockerfile-example-somewhere/m-p/1180268#M11059</guid>
      <dc:creator>MichaelBranscomb</dc:creator>
      <dc:date>2022-06-06T16:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a Dockerfile example somewhere?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/is-there-a-dockerfile-example-somewhere/m-p/1180761#M11062</link>
      <description>&lt;P&gt;Thanks for responding Michael,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I think I had chocolatey configured wrong or something ... anyway, this seems to work.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# escape=`
FROM mcr.microsoft.com/windows/servercore:ltsc2019 as base

ENV CHOCO_URL=https://chocolatey.org/install.ps1
RUN powershell -Command `
 Set-ExecutionPolicy Bypass -Scope Process -Force; `
 [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls,Tls11,Tls12'; `
 iex ((New-Object System.Net.WebClient).DownloadString("$env:CHOCO_URL"));

RUN choco install dotnet-6.0-sdk -Y

FROM mcr.microsoft.com/windows/servercore:ltsc2019 AS build
WORKDIR /src
COPY ["ConsoleApp2/ConsoleApp2.csproj", "ConsoleApp2/"]
RUN dotnet restore "ConsoleApp2/ConsoleApp2.csproj"
COPY . .
WORKDIR "/src/ConsoleApp2"
RUN dotnet build "ConsoleApp2.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "ConsoleApp2.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "ConsoleApp2.dll"]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, set this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;Project Sdk="Microsoft.NET.Sdk"&amp;gt;

  &amp;lt;PropertyGroup&amp;gt;
    &amp;lt;OutputType&amp;gt;Exe&amp;lt;/OutputType&amp;gt;
    &amp;lt;TargetFramework&amp;gt;net6.0-windows10.0.18362.0&amp;lt;/TargetFramework&amp;gt;
    &amp;lt;ImplicitUsings&amp;gt;enable&amp;lt;/ImplicitUsings&amp;gt;
    &amp;lt;Nullable&amp;gt;enable&amp;lt;/Nullable&amp;gt;
    &amp;lt;DockerDefaultTargetOS&amp;gt;Windows&amp;lt;/DockerDefaultTargetOS&amp;gt;
  &amp;lt;/PropertyGroup&amp;gt;

  &amp;lt;ItemGroup&amp;gt;
    &amp;lt;PackageReference Include="Esri.ArcGISRuntime" Version="100.14.0" /&amp;gt;
    &amp;lt;PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.15.1" /&amp;gt;
  &amp;lt;/ItemGroup&amp;gt;

&amp;lt;/Project&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 07 Jun 2022 19:01:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/is-there-a-dockerfile-example-somewhere/m-p/1180761#M11062</guid>
      <dc:creator>KirkKuykendall1</dc:creator>
      <dc:date>2022-06-07T19:01:01Z</dc:date>
    </item>
  </channel>
</rss>

