Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WinAppSdk + Single Project *.csproj : Can't command line build because of GenerateSplashAssets_... task failed unexpectedly #17897

Closed
baskren opened this issue Aug 9, 2024 · 3 comments · Fixed by unoplatform/uno.resizetizer#314
Assignees
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification

Comments

@baskren
Copy link
Contributor

baskren commented Aug 9, 2024

Current behavior

When following the documented process to Build a signed package app the [Build the app on the command line with the following command:] step produces the following build error:

click to expand build error
C:\Users\ben\.nuget\packages\uno.resizetizer\1.5.2\build\Uno.Resizetizer.windows.skia.targets(36,3): error MSB4018: The "GenerateSplashAssets_0ec1242fee84cbb93fe2e5d1674bb3173f67ccba" task failed unexpectedly. [C:\Users\ben\Development\AWC\HeightsAndAreas\HeightsAndAreas\HeightsAndAreas.csproj::TargetFramework=net8.0-windows10.0.19041]
C:\Users\ben\.nuget\packages\uno.resizetizer\1.5.2\build\Uno.Resizetizer.windows.skia.targets(36,3): error MSB4018: System.TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception. ---> System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
[C:\Users\ben\Development\AWC\HeightsAndAreas\HeightsAndAreas\HeightsAndAreas.csproj::TargetFramework=net8.0-windows10.0.19041]
C:\Users\ben\.nuget\packages\uno.resizetizer\1.5.2\build\Uno.Resizetizer.windows.skia.targets(36,3): error MSB4018:    at SkiaSharp.SkiaApi.sk_colortype_get_default_8888() [C:\Users\ben\Development\AWC\HeightsAndAreas\HeightsAndAreas\HeightsAndAreas.csproj::TargetFramework=net8.0-windows10.0.19041]
C:\Users\ben\.nuget\packages\uno.resizetizer\1.5.2\build\Uno.Resizetizer.windows.skia.targets(36,3): error MSB4018:    at SkiaSharp.SKImageInfo..cctor() [C:\Users\ben\Development\AWC\HeightsAndAreas\HeightsAndAreas\HeightsAndAreas.csproj::TargetFramework=net8.0-windows10.0.19041]
C:\Users\ben\.nuget\packages\uno.resizetizer\1.5.2\build\Uno.Resizetizer.windows.skia.targets(36,3): error MSB4018:    --- End of inner exception stack trace --- [C:\Users\ben\Development\AWC\HeightsAndAreas\HeightsAndAreas\HeightsAndAreas.csproj::TargetFramework=net8.0-windows10.0.19041]
C:\Users\ben\.nuget\packages\uno.resizetizer\1.5.2\build\Uno.Resizetizer.windows.skia.targets(36,3): error MSB4018:    at Svg.Skia.SKSvgSettings..ctor() in /_/src/Svg.Skia/SKSvgSettings.cs:line 22 [C:\Users\ben\Development\AWC\HeightsAndAreas\HeightsAndAreas\HeightsAndAreas.csproj::TargetFramework=net8.0-windows10.0.19041]
C:\Users\ben\.nuget\packages\uno.resizetizer\1.5.2\build\Uno.Resizetizer.windows.skia.targets(36,3): error MSB4018:    at Svg.Skia.SKSvg..ctor() in /_/src/Svg.Skia/SKSvg.Model.cs:line 55 [C:\Users\ben\Development\AWC\HeightsAndAreas\HeightsAndAreas\HeightsAndAreas.csproj::TargetFramework=net8.0-windows10.0.19041]
C:\Users\ben\.nuget\packages\uno.resizetizer\1.5.2\build\Uno.Resizetizer.windows.skia.targets(36,3): error MSB4018:    at Uno.Resizetizer.SkiaSharpSvgTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) [C:\Users\ben\Development\AWC\HeightsAndAreas\HeightsAndAreas\HeightsAndAreas.csproj::TargetF
ramework=net8.0-windows10.0.19041]
C:\Users\ben\.nuget\packages\uno.resizetizer\1.5.2\build\Uno.Resizetizer.windows.skia.targets(36,3): error MSB4018:    at Uno.Resizetizer.SkiaSharpTools.Create(Boolean isVector, String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) [C:\Users\ben\Development\AWC\HeightsAndAreas\HeightsAndAreas\HeightsAndAreas
.csproj::TargetFramework=net8.0-windows10.0.19041]
C:\Users\ben\.nuget\packages\uno.resizetizer\1.5.2\build\Uno.Resizetizer.windows.skia.targets(36,3): error MSB4018:    at Uno.Resizetizer.SkiaSharpAppIconTools..ctor(ResizeImageInfo info, ILogger logger) [C:\Users\ben\Development\AWC\HeightsAndAreas\HeightsAndAreas\HeightsAndAreas.csproj::TargetFramework=net8.0-windows10.0.19041]
C:\Users\ben\.nuget\packages\uno.resizetizer\1.5.2\build\Uno.Resizetizer.windows.skia.targets(36,3): error MSB4018:    at Uno.Resizetizer.GenerateSplashAssets_0ec1242fee84cbb93fe2e5d1674bb3173f67ccba.Execute() [C:\Users\ben\Development\AWC\HeightsAndAreas\HeightsAndAreas\HeightsAndAreas.csproj::TargetFramework=net8.0-windows10.0.19041]
C:\Users\ben\.nuget\packages\uno.resizetizer\1.5.2\build\Uno.Resizetizer.windows.skia.targets(36,3): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\Users\ben\Development\AWC\HeightsAndAreas\HeightsAndAreas\HeightsAndAreas.csproj::TargetFramework=net8.0-windows10.0.19041]
C:\Users\ben\.nuget\packages\uno.resizetizer\1.5.2\build\Uno.Resizetizer.windows.skia.targets(36,3): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() [C:\Users\ben\Development\AWC\HeightsAndAreas\HeightsAndAreas\HeightsAndAreas.csproj::TargetFramework=net8.0-windows10.0.19041]
Done Building Project "C:\Users\ben\Development\AWC\HeightsAndAreas\HeightsAndAreas\HeightsAndAreas.csproj" (default targets) -- FAILED.


Build FAILED.

Notes:

  • This occurs using VisualStudio 2022 ARM ... I don't have access to a x64 machine so I cannot test
  • App successfully produces Publish / Release builds without issues for WASM, iOS, and Android
  • App will successfully build (WinAppSDK packaged, both Debug and Release) within VisualStudio 2022
  • This problem occurs on a fresh blank app as well as an app that, in the past, has successfully been built and published to Microsoft PartnerCenter (using Uno 5.0).
  • This problem also occurs when attempting to complete Build an unsigned packaged app

Expected behavior

the documented process to Build a signed package app can be completed successfully

How to reproduce it (as minimally and precisely as possible)

  • Create a new blank UNO app using the following:
 dotnet new unoapp -o HeightsAndAreas -id "org.awc.HeightsAndAreas" -pub "my_partner.microsoft.com_publisher_id"
  • cd into the app's single project directory
cd HeightsAndAreas
cd HeightsAndAreas
  • restore nuget packages:
msbuild /r /t:Restore /p:Configuration=Release
  • attempt to perform a release build
msbuild /r /p:TargetFramework=net8.0-windows10.0.19041 /p:Configuration=Release /p:Platform=x64 

Workaround

None. The VisualStudio 2022 method of right clicking on the app project, selecting Package and Publish / Create App Packages no longer works as well.

  1. Architecture list no longer allows selecting of anything but Neutral
  2. After clicking on [Create], the following error appears:
>C:\Users\ben\Development\AWC\HeightsAndAreas.WinUI\HeightsAndAreas\HeightsAndAreas.csproj : error MSB4057: The target "_GenerateAppxPackage" does not exist in the project.

Works on UWP/WinUI

No

Environment

Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia

NuGet package version(s)

5.3.96 and 5.3.90

Affected platforms

Windows (WinAppSDK)

IDE

Visual Studio 2022

IDE version

Microsoft Visual Studio Community 2022 (ARM 64-bit) - Current Version 17.10.4

Relevant plugins

No response

Anything else we need to know?

No response

@baskren baskren added difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification labels Aug 9, 2024
@baskren baskren changed the title WinAppSdk : Can't publish because of GenerateSplashAssets_... task failed unexpectedly WinAppSdk : Can't command line build because of GenerateSplashAssets_... task failed unexpectedly Aug 9, 2024
@baskren baskren changed the title WinAppSdk : Can't command line build because of GenerateSplashAssets_... task failed unexpectedly WinAppSdk + Single Project *.csproj : Can't command line build because of GenerateSplashAssets_... task failed unexpectedly Aug 9, 2024
@jeromelaban
Copy link
Member

Thanks for the report. Could you provide a binlog of the build? Just before running the build, can you delete the nuget package cache folder for all uno.resizetizer versions?

@baskren
Copy link
Contributor Author

baskren commented Sep 3, 2024

@jeromelaban: My apologies for taking so long. Been on the road and I have not had the time to focus on this since you responded. Thank you for your patience.

binlog results from VisualStudio Package and Publish :
PublishTestApp_Release_AnyCPU_net8.0-windows10.0.19041_DesignTimeBuild_2024-09-03T12_05_53.2891970-04_00.zip

binlog result from Platform.Uno's Build a signed packaged app:
msbuild.binlog.zip

Here is the project used to generate the above binlog files: https://github.com/baskren/PublishTestApp

@agneszitte
Copy link
Contributor

agneszitte commented Sep 12, 2024

@Darsh0307 if you can test that the images are good and that it works in VS and for other platforms, please
If you need more information to test for this issue, please ask @jeromelaban

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants