Skip to content

Commit 6760ba9

Browse files
Turn XamlC on by default (#1422)
* Turn XamlC on by default * fix tests * winui Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
1 parent 06b4db3 commit 6760ba9

36 files changed

+86
-18
lines changed

.nuspec/Microsoft.Maui.Controls.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@
129129
OptimizeIL = "true"
130130
DebugSymbols = "$(DebugSymbols)"
131131
DebugType = "$(DebugType)"
132+
DefaultCompile = "true"
132133
ValidateOnly = "$(_MauiXamlCValidateOnly)"
133134
KeepXamlResources = "$(MauiKeepXamlResources)" />
134135
<Touch Files="$(IntermediateOutputPath)XamlC.stamp" AlwaysCreate="True" />

src/Compatibility/ControlGallery/src/Core/GalleryPages/GradientGalleries/GradientViewsGallery.xaml.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
using Microsoft.Maui.Graphics;
2+
using Microsoft.Maui.Controls.Xaml;
23

34
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.GradientGalleries
45
{
6+
[XamlCompilation(XamlCompilationOptions.Skip)]
57
public partial class GradientViewsGallery : ContentPage
68
{
79
public GradientViewsGallery()
@@ -106,4 +108,4 @@ void UpdateBackground(Brush background)
106108
TimePicker.Background = background;
107109
}
108110
}
109-
}
111+
}

src/Compatibility/ControlGallery/src/Core/GalleryPages/SwipeViewGalleries/BasicSwipeGallery.xaml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
using System;
2+
using Microsoft.Maui.Controls.Xaml;
3+
24
using Microsoft.Maui.Controls.Internals;
35

46
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
57
{
68
[Preserve(AllMembers = true)]
9+
[XamlCompilation(XamlCompilationOptions.Skip)]
710
public partial class BasicSwipeGallery : ContentPage
811
{
912
public BasicSwipeGallery()

src/Compatibility/ControlGallery/src/Core/GalleryPages/SwipeViewGalleries/HorizontalSwipeThresholdGallery.xaml.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
1+
using Microsoft.Maui.Controls.Xaml;
2+
3+
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
24
{
5+
[XamlCompilation(XamlCompilationOptions.Skip)]
36
public partial class HorizontalSwipeThresholdGallery : ContentPage
47
{
58
public HorizontalSwipeThresholdGallery()

src/Compatibility/ControlGallery/src/Core/GalleryPages/SwipeViewGalleries/ResourceSwipeItemsGallery.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
using Microsoft.Maui.Controls.Internals;
2+
using Microsoft.Maui.Controls.Xaml;
23

34
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
45
{
56
[Preserve(AllMembers = true)]
7+
[XamlCompilation(XamlCompilationOptions.Skip)]
68
public partial class ResourceSwipeItemsGallery : ContentPage
79
{
810
public ResourceSwipeItemsGallery()

src/Compatibility/ControlGallery/src/Core/GalleryPages/SwipeViewGalleries/SwipeBindableLayoutGallery.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
using System.Collections.ObjectModel;
22
using System.Windows.Input;
33
using Microsoft.Maui.Controls.Internals;
4+
using Microsoft.Maui.Controls.Xaml;
45

56
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
67
{
78
[Preserve(AllMembers = true)]
9+
[XamlCompilation(XamlCompilationOptions.Skip)]
810
public partial class SwipeBindableLayoutGallery : ContentPage
911
{
1012
public SwipeBindableLayoutGallery()

src/Compatibility/ControlGallery/src/Core/GalleryPages/SwipeViewGalleries/SwipeCarouselViewGallery.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
using Microsoft.Maui.Controls.Internals;
2+
using Microsoft.Maui.Controls.Xaml;
23

34
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
45
{
56
[Preserve(AllMembers = true)]
7+
[XamlCompilation(XamlCompilationOptions.Skip)]
68
public partial class SwipeCarouselViewGallery : ContentPage
79
{
810
public SwipeCarouselViewGallery()

src/Compatibility/ControlGallery/src/Core/GalleryPages/SwipeViewGalleries/SwipeHorizontalCollectionViewGallery.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
using Microsoft.Maui.Controls.Internals;
2+
using Microsoft.Maui.Controls.Xaml;
23

34
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
45
{
56
[Preserve(AllMembers = true)]
7+
[XamlCompilation(XamlCompilationOptions.Skip)]
68
public partial class SwipeHorizontalCollectionViewGallery : ContentPage
79
{
810
public SwipeHorizontalCollectionViewGallery()

src/Compatibility/ControlGallery/src/Core/GalleryPages/SwipeViewGalleries/SwipeListViewGallery.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
using Microsoft.Maui.Controls.Internals;
2+
using Microsoft.Maui.Controls.Xaml;
23

34
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
45
{
56
[Preserve(AllMembers = true)]
7+
[XamlCompilation(XamlCompilationOptions.Skip)]
68
public partial class SwipeListViewGallery : ContentPage
79
{
810
public SwipeListViewGallery()

src/Compatibility/ControlGallery/src/Core/GalleryPages/SwipeViewGalleries/SwipeVerticalCollectionViewGallery.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
using Microsoft.Maui.Controls.Internals;
2+
using Microsoft.Maui.Controls.Xaml;
23

34
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
45
{
56
[Preserve(AllMembers = true)]
7+
[XamlCompilation(XamlCompilationOptions.Skip)]
68
public partial class SwipeVerticalCollectionViewGallery : ContentPage
79
{
810
public SwipeVerticalCollectionViewGallery()

0 commit comments

Comments
 (0)