.NET MAUI, CI Build, Fails -> error APT2113: failed to read PNG signature: file does not start with PNG signature
Johal, Taran
5
Reputation points
I am migrating a Xamarin project to .NET Maui and all of the application is building and running fine locally. But when I try to build it through a CI pipeline in DevOps , I get the Following error in the Build step of the YAML
/bin/bash --noprofile --norc /Users/runner/work/\_temp/c00c6495-9ac3-457b-9f2e-3e8b2d23566e.sh
MSBuild version 17.5.1+f6fdcf537 for .NET
Determining projects to restore...
All projects are up-to-date for restore.
/Users/runner/work/1/s/project/obj/Release/net7.0-android/resizetizer/r/drawable/logout.png : error APT2113: failed to read PNG signature: file does not start with PNG signature. [/Users/runner/work/1/s/proj.csproj::TargetFramework=net7.0-android]
/Users/runner/work/1/s/projectobj/Release/net7.0-android/resizetizer/r/drawable/logout.png : error APT2261: file failed to compile. [/Users/runner/work/1/s/proj.csproj::TargetFramework=net7.0-android]
/Users/runner/work/1/s/project/obj/Release/net7.0-android/resizetizer/r/drawable/receiver.png : error APT2113: failed to read PNG signature: file does not start with PNG signature. [/Users/runner/work/1/s/proj.csproj::TargetFramework=net7.0-android]
/Users/runner/work/1/s/projectobj/Release/net7.0-android/resizetizer/r/drawable/receiver.png : error APT2261: file failed to compile. [/Users/runner/work/1/s/proj.csproj::TargetFramework=net7.0-android]
/Users/runner/work/1/s/project/obj/Release/net7.0-android/resizetizer/r/drawable/clear.png : error APT2113: failed to read PNG signature: file does not start with PNG signature. [/Users/runner/work/1/s/proj.csproj::TargetFramework=net7.0-android]
/Users/runner/work/1/s/project/obj/Release/net7.0-android/resizetizer/r/drawable/clear.png : error APT2261: file failed to compile. [/Users/runner/work/1/s/proj.csproj::TargetFramework=net7.0-android]
The Solution Builds Fine with Release configuration Locally and I am pretty sure the PNG files are not corrupt and are actual PNG Files.
Thank you for any kind of help :)
I am trying to Release an APK to app center and this is the only step failing
Sign in to answer