Building/Debugging Uno.UI : Possible in ARM64 dev environment? #19762
-
TL;DR: when Trying to follow Building Uno.UI and Debugging Uno.UI but only have access to M2 Mac running Windows11ARM/VisualStudio2022ARM in a Parallels VM. No luck so far but also not convinced that the errors are related to ARM dev environment. Here's an abridged history: Building Uno.UI for a single target platform
b) FWIW:
so, guessing that the Debugging Uno.UI
Build Output
Looking deeper at Build errors
So, I'm guessing, after setting
So, it looks like using the net8.0-ios TargetOverride seemed to help
So, it looks like the
After adding changing line 26 in <PackageReference
Condition=" '$(TargetFramework)' == 'net8.0-android' OR '$(TargetFramework)' == 'net9.0-android' "
Include="Xamarin.Google.Android.Play.Core" Version="1.10.3.14"
/> ... I'm getting a bunch of
Doing a quick search, turns out the following reference is in <When Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))=='android'">
<PropertyGroup>
<SupportedOSPlatformVersion>10.0</SupportedOSPlatformVersion>
<AndroidUseAssemblyStore>false</AndroidUseAssemblyStore>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<RuntimeIdentifiers>android-x64;android-arm64</RuntimeIdentifiers>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.4.0.4" />
<PackageReference Include="Uno.UniversalImageLoader" Version="1.9.37" />
<PackageReference Include="SkiaSharp.NativeAssets.Android" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Uno.UI.BindingHelper.Android\Uno.UI.BindingHelper.Android.netcoremobile.csproj" />
<ProjectReference Include="..\..\AddIns\Uno.UI.GooglePlay\Uno.UI.GooglePlay.netcoremobile.csproj" />
</ItemGroup>
<ItemGroup>
<AndroidAsset Include="Assets\sound.mp3" />
<AndroidAsset Include="Assets\Lottie\4770-lady-and-dove.json" />
<AndroidAsset Include="Assets\Lottie\4930-checkbox-animation.json" />
<AndroidAsset Include="Assets\Lottie\lottie-logo.json" />
<AndroidAsset Include="Assets\Lottie\uno.json" />
<AndroidAsset Include="Assets\Lottie\LightBulb.json" />
<AndroidAsset Include="..\LinkedFiles\WebContent\js\site.js" Link="Android\Assets\WebContent\js\site.js" />
<AndroidAsset Include="..\LinkedFiles\WebContent\css\site.css" Link="Android\Assets\WebContent\css\site.css" />
<AndroidAsset Include="..\LinkedFiles\WebContent\index.html" Link="Android\Assets\WebContent\index.html" />
<AndroidEnvironment Include="Android\environment.conf" />
</ItemGroup>
</When> So, why is the Condition in How about we replace the Condition with something less sophisticated, like
So, it appears dumbing down the "when Android" conditional seems to have worked. Why didn't
So, why the heck is anything
Nope, that wasn't it. Let's find out if there's some Looking at <RuntimeIdentifier Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">iossimulator-x64</RuntimeIdentifier> ... how about changing that to arm64? Answer: nope, still getting exit code 139. OK, giving up for now and asking for some help. VisualStudio Environment Details
System Info
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Thanks for the report. The error you're seeing is related to a known .NET issue with the AOT compiler. The only way around it is to disable AOT for specific assemblies (the one that fail), with this: dotnet/runtime#109966 (comment), and this. So you'd need:
and
in the SamplesApp.netcodemobile project. We'll add those by default in an upcoming PR to avoid this. |
Beta Was this translation helpful? Give feedback.
-
Thanks, @jeromelaban. It worked. |
Beta Was this translation helpful? Give feedback.
Thanks for the report.
The error you're seeing is related to a known .NET issue with the AOT compiler. The only way around it is to disable AOT for specific assemblies (the one that fail), with this: dotnet/runtime#109966 (comment), and this.
So you'd need:
and
in the SamplesApp.netcodemobile project.
We'll add those by default in an upcoming PR to avoid this.