diff --git a/samples/AppWithoutLifetime/AppWithoutLifetime.csproj b/samples/AppWithoutLifetime/AppWithoutLifetime.csproj index 303daa451f..caeeec77fa 100644 --- a/samples/AppWithoutLifetime/AppWithoutLifetime.csproj +++ b/samples/AppWithoutLifetime/AppWithoutLifetime.csproj @@ -2,7 +2,6 @@ WinExe $(AvsCurrentTargetFramework) - enable app.manifest diff --git a/samples/BindingDemo/GenericMarkupExtension.cs b/samples/BindingDemo/GenericMarkupExtension.cs index aed0700cb8..be7d82e0d5 100644 --- a/samples/BindingDemo/GenericMarkupExtension.cs +++ b/samples/BindingDemo/GenericMarkupExtension.cs @@ -5,7 +5,7 @@ namespace BindingDemo; internal class GenericMarkupExtension : MarkupExtension { - public T Value { get; set; } + public T? Value { get; set; } public override object ProvideValue(IServiceProvider serviceProvider) { diff --git a/samples/BindingDemo/ViewModels/DataAnnotationsErrorViewModel.cs b/samples/BindingDemo/ViewModels/DataAnnotationsErrorViewModel.cs index 391d1791d3..a51139f8ac 100644 --- a/samples/BindingDemo/ViewModels/DataAnnotationsErrorViewModel.cs +++ b/samples/BindingDemo/ViewModels/DataAnnotationsErrorViewModel.cs @@ -6,7 +6,7 @@ namespace BindingDemo.ViewModels { [Phone] [MaxLength(10)] - public string PhoneNumber { get; set; } + public string? PhoneNumber { get; set; } [Range(0, 9)] public int LessThan10 { get; set; } diff --git a/samples/BindingDemo/ViewModels/IndeiErrorViewModel.cs b/samples/BindingDemo/ViewModels/IndeiErrorViewModel.cs index 9ae8d9558f..7273da38c8 100644 --- a/samples/BindingDemo/ViewModels/IndeiErrorViewModel.cs +++ b/samples/BindingDemo/ViewModels/IndeiErrorViewModel.cs @@ -9,7 +9,7 @@ namespace BindingDemo.ViewModels { private int _maximum = 10; private int _value; - private string _valueError; + private string? _valueError; public IndeiErrorViewModel() { @@ -34,16 +34,16 @@ namespace BindingDemo.ViewModels set { this.RaiseAndSetIfChanged(ref _value, value); } } - public event EventHandler ErrorsChanged; + public event EventHandler? ErrorsChanged; - public IEnumerable GetErrors(string propertyName) + public IEnumerable GetErrors(string? propertyName) { switch (propertyName) { case nameof(Value): return new[] { _valueError }; default: - return null; + return Array.Empty(); } } diff --git a/samples/BindingDemo/ViewModels/MainWindowViewModel.cs b/samples/BindingDemo/ViewModels/MainWindowViewModel.cs index eb1a007695..3fce67a6f6 100644 --- a/samples/BindingDemo/ViewModels/MainWindowViewModel.cs +++ b/samples/BindingDemo/ViewModels/MainWindowViewModel.cs @@ -16,10 +16,10 @@ namespace BindingDemo.ViewModels { private string _booleanString = "True"; private double _doubleValue = 5.0; - private string _stringValue = "Simple Binding"; + private string? _stringValue = "Simple Binding"; private bool _booleanFlag = false; - private string _currentTime; - private NestedCommandViewModel _nested; + private string? _currentTime; + private NestedCommandViewModel? _nested; public MainWindowViewModel() { @@ -74,7 +74,7 @@ namespace BindingDemo.ViewModels set { this.RaiseAndSetIfChanged(ref _doubleValue, value); } } - public string StringValue + public string? StringValue { get { return _stringValue; } set { this.RaiseAndSetIfChanged(ref _stringValue, value); } @@ -86,7 +86,7 @@ namespace BindingDemo.ViewModels set { this.RaiseAndSetIfChanged(ref _booleanFlag, value); } } - public string CurrentTime + public string? CurrentTime { get { return _currentTime; } private set { this.RaiseAndSetIfChanged(ref _currentTime, value); } @@ -99,7 +99,7 @@ namespace BindingDemo.ViewModels public ExceptionErrorViewModel ExceptionDataValidation { get; } = new ExceptionErrorViewModel(); public IndeiErrorViewModel IndeiDataValidation { get; } = new IndeiErrorViewModel(); - public NestedCommandViewModel NestedModel + public NestedCommandViewModel? NestedModel { get { return _nested; } private set { this.RaiseAndSetIfChanged(ref _nested, value); } @@ -119,16 +119,16 @@ namespace BindingDemo.ViewModels // Nested class, jsut so we can test it in XAML public class TestItem : ViewModelBase { - private T _value; - private string _detail; + private T? _value; + private string? _detail; - public T Value + public T? Value { get { return _value; } set { this.RaiseAndSetIfChanged(ref this._value, value); } } - public string Detail + public string? Detail { get { return _detail; } set { this.RaiseAndSetIfChanged(ref this._detail, value); } diff --git a/samples/ControlCatalog.Android/ControlCatalog.Android.csproj b/samples/ControlCatalog.Android/ControlCatalog.Android.csproj index f60ba69395..b47172548e 100644 --- a/samples/ControlCatalog.Android/ControlCatalog.Android.csproj +++ b/samples/ControlCatalog.Android/ControlCatalog.Android.csproj @@ -3,7 +3,6 @@ $(AvsCurrentAndroidTargetFramework) $(AvsMinSupportedAndroidVersion) Exe - enable com.Avalonia.ControlCatalog 1 1.0 diff --git a/samples/ControlCatalog.Desktop/NativeControls/Gtk/EmbedSample.Gtk.cs b/samples/ControlCatalog.Desktop/NativeControls/Gtk/EmbedSample.Gtk.cs index c42ac73b88..523503cc38 100644 --- a/samples/ControlCatalog.Desktop/NativeControls/Gtk/EmbedSample.Gtk.cs +++ b/samples/ControlCatalog.Desktop/NativeControls/Gtk/EmbedSample.Gtk.cs @@ -9,7 +9,7 @@ namespace ControlCatalog.Desktop; public class EmbedSampleGtk : INativeDemoControl { - private Process _mplayer; + private Process? _mplayer; public IPlatformHandle CreateControl(bool isSecond, IPlatformHandle parent, Func createDefault) { diff --git a/samples/ControlCatalog.Desktop/NativeControls/Mac/MacHelper.cs b/samples/ControlCatalog.Desktop/NativeControls/Mac/MacHelper.cs index 154878e4ff..01325a5fa9 100644 --- a/samples/ControlCatalog.Desktop/NativeControls/Mac/MacHelper.cs +++ b/samples/ControlCatalog.Desktop/NativeControls/Mac/MacHelper.cs @@ -20,7 +20,7 @@ internal class MacHelper internal class MacOSViewHandle : INativeControlHostDestroyableControlHandle { - private NSView _view; + private NSView? _view; public MacOSViewHandle(NSView view) { @@ -32,7 +32,7 @@ internal class MacOSViewHandle : INativeControlHostDestroyableControlHandle public void Destroy() { - _view.Dispose(); + _view?.Dispose(); _view = null; } } diff --git a/samples/ControlCatalog.Desktop/NativeControls/Win/WinApi.cs b/samples/ControlCatalog.Desktop/NativeControls/Win/WinApi.cs index 1bb3879ac3..514f704b30 100644 --- a/samples/ControlCatalog.Desktop/NativeControls/Win/WinApi.cs +++ b/samples/ControlCatalog.Desktop/NativeControls/Win/WinApi.cs @@ -44,7 +44,7 @@ internal unsafe class WinApi [DllImport("kernel32.dll")] - public static extern IntPtr GetModuleHandle(string lpModuleName); + public static extern IntPtr GetModuleHandle(string? lpModuleName); [DllImport("user32.dll", SetLastError = true)] public static extern IntPtr CreateWindowEx( diff --git a/samples/ControlCatalog.Desktop/Program.cs b/samples/ControlCatalog.Desktop/Program.cs index 707ead5f1d..bf766cba8d 100644 --- a/samples/ControlCatalog.Desktop/Program.cs +++ b/samples/ControlCatalog.Desktop/Program.cs @@ -74,12 +74,12 @@ namespace ControlCatalog.Desktop { DispatcherTimer.RunOnce(async () => { - var window = ((IClassicDesktopStyleApplicationLifetime)Application.Current.ApplicationLifetime) - .MainWindow; + var window = ((IClassicDesktopStyleApplicationLifetime)Application.Current!.ApplicationLifetime!) + .MainWindow!; var tc = window.GetLogicalDescendants().OfType().First(); foreach (var page in tc.Items.Cast().ToList()) { - if (page.Header.ToString() == "DatePicker" || page.Header.ToString() == "TreeView") + if (page.Header?.ToString() is "DatePicker" or "TreeView") continue; Console.WriteLine("Selecting " + page.Header); tc.SelectedItem = page; diff --git a/samples/ControlCatalog/ControlCatalog.csproj b/samples/ControlCatalog/ControlCatalog.csproj index 81caa6b2e4..c71e7a93ad 100644 --- a/samples/ControlCatalog/ControlCatalog.csproj +++ b/samples/ControlCatalog/ControlCatalog.csproj @@ -2,7 +2,6 @@ $(AvsCurrentTargetFramework) true - enable true diff --git a/samples/Directory.Build.props b/samples/Directory.Build.props index 983bb034fc..ae7dba55dc 100644 --- a/samples/Directory.Build.props +++ b/samples/Directory.Build.props @@ -6,6 +6,7 @@ false false 14.0 + enable $(NoWarn);CS8002 diff --git a/samples/GpuInterop/GpuInterop.csproj b/samples/GpuInterop/GpuInterop.csproj index c05ccb875c..257ebf89de 100644 --- a/samples/GpuInterop/GpuInterop.csproj +++ b/samples/GpuInterop/GpuInterop.csproj @@ -4,7 +4,6 @@ Exe $(AvsCurrentTargetFramework) true - enable true true diff --git a/samples/IntegrationTestApp/IntegrationTestApp.csproj b/samples/IntegrationTestApp/IntegrationTestApp.csproj index 6534787226..c117111651 100644 --- a/samples/IntegrationTestApp/IntegrationTestApp.csproj +++ b/samples/IntegrationTestApp/IntegrationTestApp.csproj @@ -2,7 +2,6 @@ WinExe $(AvsCurrentTargetFramework) - enable $(NoWarn);AVP1012;AVLN3001 app.manifest true diff --git a/samples/MiniMvvm/MiniMvvm.csproj b/samples/MiniMvvm/MiniMvvm.csproj index 9e3b13c471..db66f91fd0 100644 --- a/samples/MiniMvvm/MiniMvvm.csproj +++ b/samples/MiniMvvm/MiniMvvm.csproj @@ -2,7 +2,6 @@ $(AvsCurrentTargetFramework) - enable diff --git a/samples/PlatformSanityChecks/Program.cs b/samples/PlatformSanityChecks/Program.cs index 99474bd0ab..4f515b5f17 100644 --- a/samples/PlatformSanityChecks/Program.cs +++ b/samples/PlatformSanityChecks/Program.cs @@ -12,12 +12,12 @@ namespace PlatformSanityChecks { public class Program { - static Thread UiThread; + static Thread UiThread = null!; static void Main(string[] args) { UiThread = Thread.CurrentThread; - AppBuilder.Configure().RuntimePlatformServicesInitializer(); + AppBuilder.Configure().RuntimePlatformServicesInitializer!(); var app = new App(); AvaloniaX11PlatformExtensions.InitializeX11Platform(); @@ -41,13 +41,13 @@ namespace PlatformSanityChecks throw new Exception(error); } - static IDisposable Enter([CallerMemberName] string caller = null) + static IDisposable Enter([CallerMemberName] string? caller = null) { Console.WriteLine("Entering " + caller); return Disposable.Create(() => { Console.WriteLine("Leaving " + caller); }); } - static void EnterLoop(Action cb, [CallerMemberName] string caller = null) + static void EnterLoop(Action cb, [CallerMemberName] string? caller = null) { using (Enter(caller)) { diff --git a/samples/Previewer/MainWindow.xaml.cs b/samples/Previewer/MainWindow.xaml.cs index 8eabf44bc3..dabf90f5d0 100644 --- a/samples/Previewer/MainWindow.xaml.cs +++ b/samples/Previewer/MainWindow.xaml.cs @@ -17,22 +17,22 @@ namespace Previewer Hello world! "; - private IAvaloniaRemoteTransportConnection _connection; + private IAvaloniaRemoteTransportConnection? _connection; private Control _errorsContainer; private TextBlock _errors; - private RemoteWidget _remote; + private RemoteWidget? _remote; public MainWindow() { this.InitializeComponent(); - var tb = this.FindControl("Xaml"); + var tb = this.GetControl("Xaml"); tb.Text = InitialXaml; - var scroll = this.FindControl("Remote"); + var scroll = this.GetControl("Remote"); var rem = new Center(); scroll.Content = rem; - _errorsContainer = this.FindControl("ErrorsContainer"); - _errors = this.FindControl("Errors"); + _errorsContainer = this.GetControl("ErrorsContainer"); + _errors = this.GetControl("Errors"); tb.GetObservable(TextBox.TextProperty).Subscribe(text => _connection?.Send(new UpdateXamlMessage { Xaml = text @@ -70,7 +70,7 @@ namespace Previewer _errorsContainer.IsVisible = result.Error != null; _errors.Text = result.Error ?? ""; } - if (obj is RequestViewportResizeMessage resize) + if (obj is RequestViewportResizeMessage resize && _remote is not null) { _remote.Width = Math.Min(4096, Math.Max(resize.Width, 1)); _remote.Height = Math.Min(4096, Math.Max(resize.Height, 1)); diff --git a/samples/RenderDemo/Pages/CustomSkiaPage.cs b/samples/RenderDemo/Pages/CustomSkiaPage.cs index 85dc50aadc..4f99b55d92 100644 --- a/samples/RenderDemo/Pages/CustomSkiaPage.cs +++ b/samples/RenderDemo/Pages/CustomSkiaPage.cs @@ -31,7 +31,7 @@ namespace RenderDemo.Pages public CustomDrawOp(Rect bounds, GlyphRun noSkia) { - _noSkia = noSkia.TryCreateImmutableGlyphRunReference(); + _noSkia = noSkia.TryCreateImmutableGlyphRunReference()!; Bounds = bounds; } @@ -42,7 +42,7 @@ namespace RenderDemo.Pages public Rect Bounds { get; } public bool HitTest(Point p) => false; - public bool Equals(ICustomDrawOperation other) => false; + public bool Equals(ICustomDrawOperation? other) => false; static Stopwatch St = Stopwatch.StartNew(); public void Render(ImmediateDrawingContext context) { diff --git a/samples/RenderDemo/Pages/FormattedTextPage.axaml.cs b/samples/RenderDemo/Pages/FormattedTextPage.axaml.cs index 088a063690..61f611a0df 100644 --- a/samples/RenderDemo/Pages/FormattedTextPage.axaml.cs +++ b/samples/RenderDemo/Pages/FormattedTextPage.axaml.cs @@ -57,11 +57,11 @@ namespace RenderDemo.Pages context.DrawText(formattedText, new Point(10, 0)); - var geometry = formattedText.BuildGeometry(new Point(10 + formattedText.Width + 10, 0)); + var geometry = formattedText.BuildGeometry(new Point(10 + formattedText.Width + 10, 0))!; context.DrawGeometry(gradient, null, geometry); - var highlightGeometry = formattedText.BuildHighlightGeometry(new Point(10 + formattedText.Width + 10, 0)); + var highlightGeometry = formattedText.BuildHighlightGeometry(new Point(10 + formattedText.Width + 10, 0))!; context.DrawGeometry(null, new ImmutablePen(gradient.ToImmutable(), 2), highlightGeometry); } diff --git a/samples/RenderDemo/Pages/GlyphRunPage.xaml.cs b/samples/RenderDemo/Pages/GlyphRunPage.xaml.cs index 5c31e138e0..8e8cc1cd72 100644 --- a/samples/RenderDemo/Pages/GlyphRunPage.xaml.cs +++ b/samples/RenderDemo/Pages/GlyphRunPage.xaml.cs @@ -29,7 +29,7 @@ namespace RenderDemo.Pages private float _fontSize = 20; private int _direction = 10; - private DispatcherTimer _timer; + private DispatcherTimer? _timer; protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e) { @@ -48,7 +48,7 @@ namespace RenderDemo.Pages protected override void OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs e) { - _timer.Stop(); + _timer?.Stop(); _timer = null; } @@ -88,7 +88,7 @@ namespace RenderDemo.Pages private float _fontSize = 20; private int _direction = 10; - private DispatcherTimer _timer; + private DispatcherTimer? _timer; protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e) { @@ -107,7 +107,7 @@ namespace RenderDemo.Pages protected override void OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs e) { - _timer.Stop(); + _timer?.Stop(); _timer = null; } diff --git a/samples/RenderDemo/Pages/PathMeasurementPage.cs b/samples/RenderDemo/Pages/PathMeasurementPage.cs index d18c4e6a76..fff7944a29 100644 --- a/samples/RenderDemo/Pages/PathMeasurementPage.cs +++ b/samples/RenderDemo/Pages/PathMeasurementPage.cs @@ -14,7 +14,7 @@ namespace RenderDemo.Pages AffectsRender(BoundsProperty); } - private RenderTargetBitmap _bitmap; + private RenderTargetBitmap? _bitmap; protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e) { @@ -24,7 +24,7 @@ namespace RenderDemo.Pages protected override void OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs e) { - _bitmap.Dispose(); + _bitmap?.Dispose(); _bitmap = null; base.OnDetachedFromLogicalTree(e); } @@ -37,6 +37,9 @@ namespace RenderDemo.Pages public override void Render(DrawingContext context) { + if (_bitmap is null) + return; + using (var bitmapCtx = _bitmap.CreateDrawingContext()) { var basePath = new PathGeometry(); diff --git a/samples/RenderDemo/Pages/RenderTargetBitmapPage.cs b/samples/RenderDemo/Pages/RenderTargetBitmapPage.cs index 8d6fb15a32..637f6f0e29 100644 --- a/samples/RenderDemo/Pages/RenderTargetBitmapPage.cs +++ b/samples/RenderDemo/Pages/RenderTargetBitmapPage.cs @@ -10,7 +10,7 @@ namespace RenderDemo.Pages { public class RenderTargetBitmapPage : Control { - private RenderTargetBitmap _bitmap; + private RenderTargetBitmap? _bitmap; protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e) { @@ -20,7 +20,7 @@ namespace RenderDemo.Pages protected override void OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs e) { - _bitmap.Dispose(); + _bitmap?.Dispose(); _bitmap = null; base.OnDetachedFromLogicalTree(e); } @@ -28,6 +28,9 @@ namespace RenderDemo.Pages readonly Stopwatch _st = Stopwatch.StartNew(); public override void Render(DrawingContext context) { + if (_bitmap is null) + return; + using (var ctx = _bitmap.CreateDrawingContext()) using (ctx.PushTransform(Matrix.CreateTranslation(-100, -100) * Matrix.CreateRotation(_st.Elapsed.TotalSeconds) diff --git a/samples/RenderDemo/Pages/TextFormatterPage.axaml.cs b/samples/RenderDemo/Pages/TextFormatterPage.axaml.cs index 8fbfa854b1..b021c61099 100644 --- a/samples/RenderDemo/Pages/TextFormatterPage.axaml.cs +++ b/samples/RenderDemo/Pages/TextFormatterPage.axaml.cs @@ -9,7 +9,7 @@ namespace RenderDemo.Pages { public class TextFormatterPage : UserControl { - private TextLine _textLine; + private TextLine? _textLine; public TextFormatterPage() { @@ -50,7 +50,7 @@ namespace RenderDemo.Pages { var currentX = 0d; - foreach (var textRun in _textLine.TextRuns) + foreach (var textRun in _textLine?.TextRuns ?? []) { if (textRun is ControlRun controlRun) { @@ -78,7 +78,7 @@ namespace RenderDemo.Pages _defaultProperties = defaultProperties; } - public TextRun GetTextRun(int textSourceIndex) + public TextRun? GetTextRun(int textSourceIndex) { if (textSourceIndex >= _text.Length * 2 + TextRun.DefaultTextSourceLength) { diff --git a/samples/RenderDemo/Pages/WriteableBitmapPage.cs b/samples/RenderDemo/Pages/WriteableBitmapPage.cs index a13a625d14..0d7b09352c 100644 --- a/samples/RenderDemo/Pages/WriteableBitmapPage.cs +++ b/samples/RenderDemo/Pages/WriteableBitmapPage.cs @@ -13,8 +13,8 @@ namespace RenderDemo.Pages { public class WriteableBitmapPage : Control { - private WriteableBitmap _unpremulBitmap; - private WriteableBitmap _premulBitmap; + private WriteableBitmap? _unpremulBitmap; + private WriteableBitmap? _premulBitmap; private readonly Stopwatch _st = Stopwatch.StartNew(); protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e) @@ -38,6 +38,9 @@ namespace RenderDemo.Pages public override void Render(DrawingContext context) { + if (_unpremulBitmap is null || _premulBitmap is null) + return; + void FillPixels(WriteableBitmap bitmap, byte fillAlpha, bool premul) { using (var fb = bitmap.Lock()) diff --git a/samples/SafeAreaDemo.Android/SafeAreaDemo.Android.csproj b/samples/SafeAreaDemo.Android/SafeAreaDemo.Android.csproj index 413bb8333e..e79d0e166c 100644 --- a/samples/SafeAreaDemo.Android/SafeAreaDemo.Android.csproj +++ b/samples/SafeAreaDemo.Android/SafeAreaDemo.Android.csproj @@ -3,7 +3,6 @@ Exe $(AvsCurrentAndroidTargetFramework) $(AvsMinSupportedAndroidVersion) - enable com.avalonia.safeareademo 1 1.0 diff --git a/samples/SafeAreaDemo.Desktop/SafeAreaDemo.Desktop.csproj b/samples/SafeAreaDemo.Desktop/SafeAreaDemo.Desktop.csproj index fe8e9d4506..e633b723a5 100644 --- a/samples/SafeAreaDemo.Desktop/SafeAreaDemo.Desktop.csproj +++ b/samples/SafeAreaDemo.Desktop/SafeAreaDemo.Desktop.csproj @@ -2,7 +2,6 @@ WinExe $(AvsCurrentTargetFramework) - enable diff --git a/samples/SafeAreaDemo.iOS/SafeAreaDemo.iOS.csproj b/samples/SafeAreaDemo.iOS/SafeAreaDemo.iOS.csproj index 2f16e335de..ac3f31159d 100644 --- a/samples/SafeAreaDemo.iOS/SafeAreaDemo.iOS.csproj +++ b/samples/SafeAreaDemo.iOS/SafeAreaDemo.iOS.csproj @@ -4,7 +4,6 @@ $(AvsCurrentIOSTargetFramework) $(AvsMinSupportedIOSVersion) manual - enable diff --git a/samples/SafeAreaDemo/SafeAreaDemo.csproj b/samples/SafeAreaDemo/SafeAreaDemo.csproj index 4a1e47015b..1219e33b68 100644 --- a/samples/SafeAreaDemo/SafeAreaDemo.csproj +++ b/samples/SafeAreaDemo/SafeAreaDemo.csproj @@ -1,7 +1,6 @@  $(AvsCurrentTargetFramework) - enable true diff --git a/samples/SampleControls/ControlSamples.csproj b/samples/SampleControls/ControlSamples.csproj index 405175d01c..9abeaabd91 100644 --- a/samples/SampleControls/ControlSamples.csproj +++ b/samples/SampleControls/ControlSamples.csproj @@ -2,7 +2,6 @@ $(AvsCurrentTargetFramework) - enable diff --git a/samples/SingleProjectSandbox/SingleProjectSandbox.csproj b/samples/SingleProjectSandbox/SingleProjectSandbox.csproj index 4c7c49ed3e..8bef1d53d7 100644 --- a/samples/SingleProjectSandbox/SingleProjectSandbox.csproj +++ b/samples/SingleProjectSandbox/SingleProjectSandbox.csproj @@ -5,7 +5,6 @@ $(TargetFrameworks);$(AvsCurrentMacOSTargetFramework) Exe true - enable true diff --git a/samples/TextTestApp/TextTestApp.csproj b/samples/TextTestApp/TextTestApp.csproj index 50dc52c768..41c0492cf6 100644 --- a/samples/TextTestApp/TextTestApp.csproj +++ b/samples/TextTestApp/TextTestApp.csproj @@ -6,7 +6,6 @@ true app.manifest true - enable diff --git a/samples/UnloadableAssemblyLoadContext/UnloadableAssemblyLoadContext/UnloadableAssemblyLoadContext.csproj b/samples/UnloadableAssemblyLoadContext/UnloadableAssemblyLoadContext/UnloadableAssemblyLoadContext.csproj index 8508765545..23c4d7e08b 100644 --- a/samples/UnloadableAssemblyLoadContext/UnloadableAssemblyLoadContext/UnloadableAssemblyLoadContext.csproj +++ b/samples/UnloadableAssemblyLoadContext/UnloadableAssemblyLoadContext/UnloadableAssemblyLoadContext.csproj @@ -3,7 +3,6 @@ WinExe $(AvsCurrentTargetFramework) - enable true app.manifest true diff --git a/samples/UnloadableAssemblyLoadContext/UnloadableAssemblyLoadContextPlug/UnloadableAssemblyLoadContextPlug.csproj b/samples/UnloadableAssemblyLoadContext/UnloadableAssemblyLoadContextPlug/UnloadableAssemblyLoadContextPlug.csproj index 5d43f20cc4..6329444078 100644 --- a/samples/UnloadableAssemblyLoadContext/UnloadableAssemblyLoadContextPlug/UnloadableAssemblyLoadContextPlug.csproj +++ b/samples/UnloadableAssemblyLoadContext/UnloadableAssemblyLoadContextPlug/UnloadableAssemblyLoadContextPlug.csproj @@ -2,7 +2,6 @@ $(AvsCurrentTargetFramework) - enable true app.manifest true diff --git a/samples/XEmbedSample/XEmbedSample.csproj b/samples/XEmbedSample/XEmbedSample.csproj index 89bbf13273..2e34bb2cc7 100644 --- a/samples/XEmbedSample/XEmbedSample.csproj +++ b/samples/XEmbedSample/XEmbedSample.csproj @@ -4,16 +4,8 @@ Exe $(AvsCurrentTargetFramework) enable - enable true - - Exe - $(AvsCurrentTargetFramework) - enable - enable - true - diff --git a/src/Headless/Avalonia.Headless.Vnc/HeadlessVncPlatformExtensions.cs b/src/Headless/Avalonia.Headless.Vnc/HeadlessVncPlatformExtensions.cs index 383075a746..520e412ccb 100644 --- a/src/Headless/Avalonia.Headless.Vnc/HeadlessVncPlatformExtensions.cs +++ b/src/Headless/Avalonia.Headless.Vnc/HeadlessVncPlatformExtensions.cs @@ -26,7 +26,7 @@ namespace Avalonia /// public static int StartWithHeadlessVncPlatform( this AppBuilder builder, - string host, int port, + string? host, int port, string[] args, ShutdownMode shutdownMode = ShutdownMode.OnLastWindowClose) { @@ -46,7 +46,7 @@ namespace Avalonia /// public static int StartWithHeadlessVncPlatform( this AppBuilder builder, - string host, int port, + string? host, int port, string? password, string[] args, ShutdownMode shutdownMode = ShutdownMode.OnLastWindowClose)