Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn XamlC on by default #1422

Merged
merged 4 commits into from
Jun 29, 2021
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.targets
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
OptimizeIL = "true"
DebugSymbols = "$(DebugSymbols)"
DebugType = "$(DebugType)"
DefaultCompile = "true"
ValidateOnly = "$(_MauiXamlCValidateOnly)"
KeepXamlResources = "$(MauiKeepXamlResources)" />
<Touch Files="$(IntermediateOutputPath)XamlC.stamp" AlwaysCreate="True" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
using Microsoft.Maui.Graphics;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.GradientGalleries
{
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class GradientViewsGallery : ContentPage
{
public GradientViewsGallery()
Expand Down Expand Up @@ -106,4 +108,4 @@ void UpdateBackground(Brush background)
TimePicker.Background = background;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
using System;
using Microsoft.Maui.Controls.Xaml;

using Microsoft.Maui.Controls.Internals;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[Preserve(AllMembers = true)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class BasicSwipeGallery : ContentPage
{
public BasicSwipeGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class HorizontalSwipeThresholdGallery : ContentPage
{
public HorizontalSwipeThresholdGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[Preserve(AllMembers = true)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class ResourceSwipeItemsGallery : ContentPage
{
public ResourceSwipeItemsGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System.Collections.ObjectModel;
using System.Windows.Input;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[Preserve(AllMembers = true)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class SwipeBindableLayoutGallery : ContentPage
{
public SwipeBindableLayoutGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[Preserve(AllMembers = true)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class SwipeCarouselViewGallery : ContentPage
{
public SwipeCarouselViewGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[Preserve(AllMembers = true)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class SwipeHorizontalCollectionViewGallery : ContentPage
{
public SwipeHorizontalCollectionViewGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[Preserve(AllMembers = true)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class SwipeListViewGallery : ContentPage
{
public SwipeListViewGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[Preserve(AllMembers = true)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class SwipeVerticalCollectionViewGallery : ContentPage
{
public SwipeVerticalCollectionViewGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System.Collections.ObjectModel;
using System.Windows.Input;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[Preserve(AllMembers = true)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class SwipeViewBindingContextGallery : ContentPage
{
public SwipeViewBindingContextGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class SwipeViewGestureRecognizerGallery : ContentPage
{
public SwipeViewGestureRecognizerGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class SwipeViewVisualStatesCollectionGallery : ContentPage
{
public SwipeViewVisualStatesCollectionGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class VerticalSwipeThresholdGallery : ContentPage
{
public VerticalSwipeThresholdGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.VisualStateManagerGalleries
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.VisualStateManagerGalleries
{
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class DualScreenStateTriggerGallery : ContentPage
{
public DualScreenStateTriggerGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using System;
using System.Windows.Input;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.VisualStateManagerGalleries
{
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class StateTriggerEventsGallery : ContentPage
{
public StateTriggerEventsGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
using System.Windows.Input;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.VisualStateManagerGalleries
{
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class StateTriggersDirectlyOnElements : ContentPage
{
public StateTriggersDirectlyOnElements()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
using System.Threading.Tasks;
using System.Xml.Linq;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery
{
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class BlogPage : ContentPage
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Threading.Tasks;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery
{
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class TwitterPage : ContentPage
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
using System.Text;
using System.Threading.Tasks;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Xaml;


namespace App2
{
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class Page1 : ContentPage
{
public Page1()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.XamStore
{
[Preserve(AllMembers = true)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class DemoShellPage : ContentPage
{

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Microsoft.Maui.Controls.CustomAttributes;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues
{
Expand All @@ -8,6 +9,7 @@ namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 29107, "Xamarin.Android ScrollView text overlaps", PlatformAffected.Android)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class Bugzilla29107 : TestContentPage
{
public Bugzilla29107()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.CustomAttributes;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues
{
Expand All @@ -13,6 +14,7 @@ namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 45284, "[iOS10] Extra tab icons display in iOS when binding Title on TabbedPage", PlatformAffected.iOS)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class Bugzilla45284 : TabbedPage
{
public Bugzilla45284()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Microsoft.Maui.Controls.CustomAttributes;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues
{
Expand All @@ -9,6 +10,7 @@ namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 54977, "Toolbaritems do not appear", PlatformAffected.Android, NavigationBehavior.PushAsync)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class Bugzilla54977 : ContentPage
{
string _prefix;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Windows.Input;
using Microsoft.Maui.Controls.CustomAttributes;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

#if UITEST
using Xamarin.UITest;
Expand All @@ -21,6 +22,7 @@ namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues
[Issue(IssueTracker.Github, 12910,
"[Bug] 'Cannot access a disposed object. Object name: 'DefaultRenderer' - on ios with CollectionView and EmptyView",
PlatformAffected.iOS)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class Issue12910 : TestContentPage
{
readonly Issue12910ViewModel _viewModel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Maui.Controls.Xaml;

using Microsoft.Maui.Controls.CustomAttributes;
using Microsoft.Maui.Controls.Internals;
Expand All @@ -16,6 +17,7 @@ namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 1653, "ScrollView exceeding bounds", PlatformAffected.Android | PlatformAffected.iOS | PlatformAffected.WinPhone)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class Issue1653 : ContentPage
{
public Issue1653()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.CustomAttributes;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues
{
Expand All @@ -12,6 +13,7 @@ namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 1653, "ScrollView exceeding bounds - v2", PlatformAffected.Android | PlatformAffected.iOS | PlatformAffected.WinPhone)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class Issue1653v2 : ContentPage
{
public Issue1653v2()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.CustomAttributes;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues
{
#if APP
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 2282, "ListView ItemTapped issue on Windows phone", PlatformAffected.WinPhone)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class Issue2282 : ContentPage
{
public Issue2282()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
using System.Threading.Tasks;
using Microsoft.Maui.Controls.CustomAttributes;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

#if UITEST
using Xamarin.UITest;
using NUnit.Framework;
Expand All @@ -24,6 +26,7 @@ namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues
// this doesn't fail on Uwp but it leaves a browser window open and breaks later tests
[Category(UITestCategories.UwpIgnore)]
#endif
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class Issue2357 : FlyoutPage
{
public Issue2357()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.CustomAttributes;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

#if UITEST
using Xamarin.UITest.Queries;
Expand All @@ -23,6 +24,7 @@ namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 2951, "On Android, button background is not updated when color changes ")]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class Issue2951 : TestContentPage
{
public Issue2951()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues
{
[Issue(IssueTracker.Github, 8715, "NullReferenceException Microsoft.Maui.Controls.Platform.iOS.StructuredItemsViewRenderer [Bug]",
PlatformAffected.iOS)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class Issue8715 : TestShell
{
public Issue8715()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Microsoft.Maui.Controls.CustomAttributes;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

#if UITEST
using Xamarin.UITest;
Expand All @@ -11,6 +12,7 @@ namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues

[Preserve(AllMembers = true)]
[Issue(IssueTracker.None, 1, "Using Rect struct to position items")]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class RectTest : TestContentPage
{
public RectTest()
Expand Down
Loading