maui icon indicating copy to clipboard operation
maui copied to clipboard

[XVS][VSM][MAUI]There were 3 errors when building and canceling solution several times

Open Redth opened this issue 1 year ago • 18 comments

**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:

  1. Create Maui project.
  2. Set Target Framework as 'net7.0-android' and select android device.
  3. Build the solution, cancel the project being built, build again, cancel the project being built for several times.
  4. 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.

image


'appicon' is generated by MAUI at build time:

https://github.com/dotnet/maui/blob/main/src/SingleProject/Resizetizer/src/nuget/buildTransitive/Microsoft.Maui.Resizetizer.After.targets Opens in new window or tab

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.

Redth avatar Nov 08 '23 19:11 Redth

I also see this happening every now and then.

borrmann avatar Nov 09 '23 00:11 borrmann

Any work around?

Strypper avatar Nov 14 '23 18:11 Strypper

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).

dellis1972 avatar Nov 15 '23 14:11 dellis1972

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.

ghost avatar Nov 15 '23 14:11 ghost

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.

ghost avatar Nov 20 '23 00:11 ghost

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.

ghost avatar Nov 27 '23 00:11 ghost

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.

ghost avatar Dec 01 '23 10:12 ghost

Re-opening as this is still an issue that needs a repo.

dellis1972 avatar Dec 04 '23 11:12 dellis1972

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.

ghost avatar Dec 08 '23 12:12 ghost

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.

ghost avatar Dec 15 '23 15:12 ghost

I am facing same problem. Even new maui project does not work. Existing project also gives this error. image

Hrishikesh46779 avatar Dec 17 '23 14:12 Hrishikesh46779

@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 avatar Dec 19 '23 11:12 dellis1972

@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) binlog_screenshot

Hrishikesh46779 avatar Dec 19 '23 15:12 Hrishikesh46779

@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 avatar Dec 19 '23 22:12 dellis1972

@dellis1972 i deleted bin and obj folders and then captured these logs.

Hrishikesh46779 avatar Dec 20 '23 04:12 Hrishikesh46779

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 avatar Jan 11 '24 09:01 MSicc

@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 avatar Jan 11 '24 10:01 dellis1972

@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.

MSicc avatar Jan 11 '24 13:01 MSicc

@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.

MSicc avatar Jan 18 '24 05:01 MSicc

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!

jfversluis avatar May 04 '24 12:05 jfversluis