maui icon indicating copy to clipboard operation
maui copied to clipboard

Settings `-p:MauiXamlCValidateOnly=False` not working on `Debug` configuration

Open yunusefendi52 opened this issue 3 years ago • 2 comments

Description

setting MauiXamlCValidateOnly to false not working on Debug configuration, log:

Set Property: _MauiXamlCValidateOnly=False
Set Property: _MauiXamlCValidateOnly=True

other logs

ValidateOnly=True. Skipping writing assembly.

Looking at the source, it's working when settings it to -p:MauiXamlCValidateOnly=False -p:_MauiForceXamlCForDebug=True

Set Property: _MauiXamlCValidateOnly=False

Confirmed by the output dll with IL compiled xaml

Steps to Reproduce

  1. Create maui project
  2. dotnet build -f net6.0 -v diag -p:MauiXamlCValidateOnly=false

Expected: output dll should have IL compiled XAML Actual: output dll doesn't have IL compiled XAML

Link to public reproduction project repository

no

Version with bug

6.0.486 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, Windows, macOS, Other (Tizen, Linux, etc. not supported by Microsoft directly)

Affected platform versions

All?

Did you find any workaround?

Add -p:_MauiForceXamlCForDebug=True arg to force, but as far as I know property group prefixed with _ usually for internal use only

Relevant log output

No response

yunusefendi52 avatar Oct 23 '22 00:10 yunusefendi52

cc @StephaneDelcroix

jsuarezruiz avatar Oct 26 '22 18:10 jsuarezruiz

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

ghost avatar Oct 27 '22 19:10 ghost

I think these two are relevant for this issue:

  • https://github.com/dotnet/maui/issues/8633#issuecomment-1184391972 where @StephaneDelcroix mentions The msbuild variable to change this behaviour isn't considered public API (starts with an _), so I won't advertise it, but it can be found on this line https://github.com/dotnet/maui/blob/main/.nuspec/Microsoft.Maui.Controls.targets#L146 https://github.com/dotnet/maui/blob/377ab996ca8e0ba29e65c9f3b24264d95eac07ae/.nuspec/Microsoft.Maui.Controls.targets#L146 (link modified by me for .NET 7)
    • Based on this, I think it should help in .NET 7: <_MauiForceXamlCForDebug>True</_MauiForceXamlCForDebug>
  • https://github.com/dotnet/maui/pull/14638 (released in https://github.com/dotnet/maui/releases/tag/8.0.0-preview.4.8333)

MartyIX avatar May 19 '23 08:05 MartyIX

Verified this issue with Visual Studio Enterprise 17.9.0 Preview 2. Not repro this issue.

homeyf avatar Dec 13 '23 07:12 homeyf

Hi @yunusefendi52. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

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 Dec 13 '23 07:12 ghost