Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nuspec/Microsoft.Maui.Controls.Debug.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MauiKeepXamlResources>True</MauiKeepXamlResources>
<_MauiForceXamlCForDebug>True</_MauiForceXamlCForDebug>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we do False by default?

</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)Microsoft.Maui.Controls.targets" />
Expand Down
1 change: 1 addition & 0 deletions .nuspec/Microsoft.Maui.Controls.targets
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
Condition=" '$(DesignTimeBuild)' != 'True' AND '@(MauiXaml)' != ''">
<PropertyGroup>
<_MauiXamlCValidateOnly>$(MauiXamlCValidateOnly)</_MauiXamlCValidateOnly>
<_MauiXamlCValidateOnly Condition="'$(Configuration)' != 'Release' AND '$(_MauiForceXamlCForDebug)' != 'True'">True</_MauiXamlCValidateOnly>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an FYI a user can name their $(Configuration) anything. So like this wouldn't work for an AppStore configuration.

It might be better to check other properties for this like $(Optimize) or $(DebugSymbols).

You wouldn't need to check $(EmbedAssembliesIntoApk), but this is what Xamarin.Android has used for a long time:

https://github.com/xamarin/xamarin-android/blob/4ed6a222ed07551734b28525dd269d50ac107ea8/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets#L302-L323

<_MauiXamlCValidateOnly Condition="'$(BuildingForLiveUnitTesting)' == 'True' ">True</_MauiXamlCValidateOnly>
</PropertyGroup>
<XamlCTask
Expand Down