maui
maui copied to clipboard
[XVS][VSM][MAUI]There were 3 errors when building and canceling solution several times
**Affected Build:**17.5.0 Preview 4.0 [33319.269.d17.5] Affect Target framework: net7.0-android/iOS/windows/maccatalyst ; net6.0-android/iOS/windows/maccatalyst
Version info:
- Microsoft.net.sdk.android : "33.0.26"
- Microsoft.net.sdk.iOS : "16.2.1007"
- Microsoft.net.sdk.Maui: "7.0.59"
Steps to reproduce:
- Create Maui project.
- Set Target Framework as 'net7.0-android' and select android device.
- Build the solution, cancel the project being built, build again, cancel the project being built for several times.
- Build the solution.
Actual Result: Build failed with 3 errors:
Error APT2260 resource mipmap/appicon (aka com.companyname.mauiapp17:mipmap/appicon) not found.
Error APT2260 resource mipmap/appicon_round (akacom.companyname.mauiapp17:mipmap/appicon_round) not found.
Error APT2067 failed processing manifest.
'appicon' is generated by MAUI at build time:
I would suspect that potentially the <ResizetizeImages/> MSBuild task has an incremental build bug when canceled. Changing area path for now.
looking at the new logs, the target "ResizetizeImages" is being skipped, and it appears that the expected app icons do not exist. But the stamp file is still in place.
I've not seen any point in the logs provided where the appicon files are deleted yet. So I'm not sure what is deleting them.
I also see this happening every now and then.
Any work around?
A request for people who hit this issue.
Install Project System Tools extension and enabled Build Logging when VS starts https://github.com/dotnet/project-system-tools.
Work as normal until you hit the issue. Then export ALL the builds from the Project System Tools and zip them up. You can either upload them here or email them to me directly (my email is in my profile).
Hi @Redth. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
Re-opening as this is still an issue that needs a repo.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
I am facing same problem. Even new maui project does not work. Existing project also gives this error.
@Hrishikesh46779
Can you install the Project System Tools
extension (https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.ProjectSystemTools2022) and capture a number of logs.
You'll need to turn on the build logging before opening the project, and make sure you start from a clean project (i.e no bin/obj folders). This should allow use to look at the data and see which files are getting deleted/not created.
@dellis1972 Here is the .binlog file. Its cannot be attached as .binlog so i zipped it. MauiApp1_Debug_AnyCPU_Build_2023-12-19T21_19_10.6529423+05_30.zip
here is screenshot of binlog messages- (I took multiple screenshots and stitched in photoshop)
@Hrishikesh46779 thanks. However we are going to need a few binlog files. If this happens on a Clean build (1st build) then one would be fine. But I suspect something is cleaning up the files in a previous build. So we need the previous build to the one which has the error. You can grab that data using the Project System Tools you installed.
@dellis1972 i deleted bin and obj folders and then captured these logs.
Just to notice, this happens also on Mac, both with Rider and VS4MAC
Most of the times it helps to rebuild several times to make the error go away.
Both me and my colleague have this problem.
@MSicc if you have the build logs I asked for in https://github.com/dotnet/maui/issues/18636#issuecomment-1863537400 that would be great. I know Project System tools does not exist on Mac, so you'll need to capture the binlog files manually. There should be a way to set your logging level to diagnostic in the IDE's on Mac. We will need diagnostic logs not only from the build which has the error, but also the build before. I suspect something is either deleting the files or they are not being included. The deletion will have happened on the previous build.
@dellis1972 I tried to generate them from within Rider on my Mac, but wasn't successful so far. Once I use the diagnostic log, the error does not happen. I'll keep trying to provide the needed logs.
@dellis1972 during the last days, I recognised that the error is happening only after branch changes or refreshes, deletion of bin&obj folders or after cleaning the solution.
For me, it seems that the first creation after those events is the problem (at least for macOS). I have verified this behaviour both on my work Mac as well as on my private Mac with different solutions.
We think that this might be solved by #21838. Please try the nightly feed or wait for a next release where this change is included. If this turns out not to be the case, please feel free to open a new issue about this and refer to this one, thanks!