Publish/Deploy self-contained win-x64 not working for .NET7 in 200.0.0

3011
5
Jump to solution
02-25-2023 05:32 AM
Labels (3)
SokoFromNZ
Occasional Contributor

Hi,

I've found a bug in the current version (I reckon).

I'm using Esri.ArcGISRuntime.WPF v200.0.0 in a WPF + NET7 application.

I am publishing it as self-contained win-x64.

Accoring to https://developers.arcgis.com/net/license-and-deployment/deployment/#wpf-or-winui-targeting-net-6-or... your DLLs should be copied to the <Output>\publish folder... which they are not.

In fact all the files in <BuildOut>\runtimes\win10-x64\native\ are not copied (i.e. RuntimeCoreNet200_0.dll).

Here's my csproj:

 

<Project Sdk="Microsoft.NET.Sdk">

	<PropertyGroup>
		<OutputType>WinExe</OutputType>
		<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
		<Nullable>enable</Nullable>
		<ImplicitUsings>disable</ImplicitUsings>
		<UseWPF>true</UseWPF>
	</PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Esri.ArcGISRuntime.WPF" Version="200.0.0" />
  </ItemGroup>

</Project>

 

Please let me know if you know about this already and when it will be fixed.

I can copy those DLLs afterwards myself. But if I want to deploy/publish it as single-file I'm out of luck 😞

thx

PS: I've also attached my full Solution for reproduction purposes

0 Kudos
1 Solution

Accepted Solutions
dotMorten_esri
Esri Notable Contributor

Yeah that’s a VS bug. In your project settings add this and it should show:

<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>

Or you can manually change it in the publish settings file.

View solution in original post

5 Replies
dotMorten_esri
Esri Notable Contributor

Make sure when you publish to set your runtime identifier to “win10-x64”.

This is a change from 100.x where the RID was “win-x64”.

Side note: v200.1 will generate a helpful build error if you use an unsupported RID so that you’ll realize this a little easier.

SokoFromNZ
Occasional Contributor

Hi,

I would... if I could... see screenshot

SokoFromNZ_1-1677344131120.png

 

 

0 Kudos
dotMorten_esri
Esri Notable Contributor

Yeah that’s a VS bug. In your project settings add this and it should show:

<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>

Or you can manually change it in the publish settings file.

RussellSchwab
New Contributor II

How do you set the Runtime for a .msix packaged project?  I've tried adding <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers> to the <PropertyGroup> for both the project .csproj and the MSIX Packaging .csproj

0 Kudos
HansSlag
New Contributor

I have the same about  the msix, how to configure these settings?

To following error appears:  The runtime identifier 'win-x86' is not supported by the 'Esri.ArcGISRuntime.runtimes.win10' package. Please specify either win10-x86, win10-x64, or win10-arm64. 

...\.nuget\packages\esri.arcgisruntime.runtimes.win10\200.2.0\buildTransitive\net6.0-windows10.0.19041.0\Esri.ArcGISRuntime.runtimes.win10.targets 6

0 Kudos