Open janne-hmp opened 3 weeks ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Verified this issue with the provided repo:
It works fine on 17.12.0 Preview 1.0 (.NET SDK: 9.0.100-preview.6.24328.19, MAUI Version: 9.0.0-preview.6.24327.7).
I also change the Maui version to<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.0-preview.7.24408.5" />
. It can be build with no errors.
And in 17.12.0 Preview 2.0 [35212.213.main] (.NET SDK: 9.0.100-preview.7.24407.12, MAUI Version: 9.0.0-preview.7.24408.5).
In debug target, the build will fail with the error MSB4018: The "XamlCTask" task failed unexpectedly. In Release mode, it builds successfully.
If I downgrade the MAUI version to <PackageReference Include="Microsoft.Maui.Controls" Version="9.0.0-preview.6.24327.7" />
, it still failed.
Maybe it's not regression for MAUI, it's regression for .NET SDK? I'm not sure. I'd like to mark as regression first.
Description
Starting in Preview 7, when building with Visual Studio 2022 17.12.0 for Android or Windows, with
<_MauiForceXamlCForDebug>true</_MauiForceXamlCForDebug>
, XamlC fails (XamlCTask failed) when the project is being built in Debug, but works in Release. When I comment_MauiForceXamlCForDebug
out, the project builds successfully.I would note the following:
<_MauiForceXamlCForDebug>true</_MauiForceXamlCForDebug>
<_MauiForceXamlCForDebug>true</_MauiForceXamlCForDebug>
.<_MauiForceXamlCForDebug>true</_MauiForceXamlCForDebug>
in both Release and Debug. It is difficult to know what my game's problem is, as it does not specify which XAML file causes the problem and why.Binlogs: GnollHackM_Debug_AnyCPU_net9.0-android_Build_2024-08-16T18_25_44.2272374+03_00.binlog.zip GnollHackM_Debug_AnyCPU_net9.0-windows10.0.19041.0_Build_2024-08-16T18_24_41.6697375+03_00.binlog.zip
Steps to Reproduce
Link to public reproduction project repository
https://github.com/hyvanmielenpelit/GnollHack
Version with bug
9.0.0-preview.7.24407.4
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
9.0.0-preview.6.24327.7
Affected platforms
Android, Windows
Affected platform versions
Android 14, Windows 10.0.22631
Did you find any workaround?
No, you have to build in Release or use Preview 6 for Debug. Or not use Debug and test for XamlC compilation separately in Release. Or you have to just use iOS.
Relevant log output