Преглед на файлове

Merge branch 'master' into feature/custom-cursors

Steven Kirk преди 5 години
родител
ревизия
5003b10cc9
променени са 80 файла, в които са добавени 307 реда и са изтрити 333 реда
  1. 4 0
      azure-pipelines.yml
  2. BIN
      build/Assets/Icon.png
  3. 7 1
      build/SharedVersion.props
  4. 2 2
      build/SourceLink.props
  5. 4 0
      build/XUnit.props
  6. BIN
      build/avalonia.snk
  7. 1 0
      dirs.proj
  8. 2 1
      nukebuild/BuildTasksPatcher.cs
  9. 1 1
      nukebuild/_build.csproj
  10. 3 0
      packages/Avalonia/AvaloniaBuildTasks.targets
  11. 13 7
      samples/BindingDemo/App.xaml.cs
  12. 2 6
      samples/ControlCatalog.Desktop/Program.cs
  13. 0 1
      samples/ControlCatalog.NetCore/ControlCatalog.NetCore.csproj
  14. 9 1
      samples/Previewer/App.xaml.cs
  15. 8 7
      samples/Previewer/Program.cs
  16. 10 1
      samples/RenderDemo/App.xaml.cs
  17. 3 3
      samples/RenderDemo/Pages/GlyphRunPage.xaml
  18. 4 3
      samples/RenderDemo/Pages/GlyphRunPage.xaml.cs
  19. 8 0
      samples/VirtualizationDemo/App.xaml.cs
  20. 9 11
      samples/VirtualizationDemo/Program.cs
  21. 8 0
      samples/interop/Direct3DInteropSample/App.paml.cs
  22. 9 12
      samples/interop/Direct3DInteropSample/Program.cs
  23. 0 1
      samples/interop/NativeEmbedSample/NativeEmbedSample.csproj
  24. 2 2
      src/Avalonia.Animation/Properties/AssemblyInfo.cs
  25. 5 5
      src/Avalonia.Base/Properties/AssemblyInfo.cs
  26. 1 1
      src/Avalonia.Build.Tasks/Avalonia.Build.Tasks.csproj
  27. 7 1
      src/Avalonia.Build.Tasks/CompileAvaloniaXamlTask.cs
  28. 21 5
      src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs
  29. 1 0
      src/Avalonia.Controls.DataGrid/DataGridColumn.cs
  30. 2 2
      src/Avalonia.Controls.DataGrid/Properties/AssemblyInfo.cs
  31. 1 0
      src/Avalonia.Controls/Primitives/IPopupHost.cs
  32. 2 2
      src/Avalonia.Controls/Properties/AssemblyInfo.cs
  33. 1 1
      src/Avalonia.Controls/Window.cs
  34. 1 3
      src/Avalonia.FreeDesktop/Avalonia.FreeDesktop.csproj
  35. 1 1
      src/Avalonia.Layout/Properties/AssemblyInfo.cs
  36. 1 1
      src/Avalonia.Styling/Properties/AssemblyInfo.cs
  37. 0 1
      src/Avalonia.Visuals/Media/Imaging/Bitmap.cs
  38. 1 1
      src/Avalonia.Visuals/Platform/IDrawingContextImpl.cs
  39. 4 4
      src/Avalonia.Visuals/Properties/AssemblyInfo.cs
  40. 3 4
      src/Avalonia.Visuals/Rendering/SceneGraph/ExperimentalAcrylicNode.cs
  41. 0 1
      src/Avalonia.Visuals/Rendering/SceneGraph/GeometryNode.cs
  42. 1 1
      src/Avalonia.Visuals/Rendering/SceneGraph/RectangleNode.cs
  43. 8 8
      src/Linux/Avalonia.LinuxFramebuffer/Output/Drm.cs
  44. 26 5
      src/Markup/Avalonia.Markup.Xaml.Loader/AvaloniaRuntimeXamlLoader.cs
  45. 1 1
      src/Markup/Avalonia.Markup.Xaml/Properties/AssemblyInfo.cs
  46. 1 1
      src/Markup/Avalonia.Markup/Properties/AssemblyInfo.cs
  47. 2 2
      src/Skia/Avalonia.Skia/Properties/AssemblyInfo.cs
  48. 0 1
      src/Windows/Avalonia.Direct2D1/Media/DrawingContextImpl.cs
  49. 2 2
      src/Windows/Avalonia.Direct2D1/Properties/AssemblyInfo.cs
  50. 1 1
      src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj
  51. 1 0
      src/Windows/Avalonia.Win32/Interop/TaskBarList.cs
  52. 4 4
      tests/Avalonia.Animation.UnitTests/AnimatableTests.cs
  53. 2 2
      tests/Avalonia.Base.UnitTests/AvaloniaObjectTests_Metadata.cs
  54. 4 0
      tests/Avalonia.Base.UnitTests/Collections/AvaloniaListExtenionsTests.cs
  55. 1 1
      tests/Avalonia.Base.UnitTests/Data/Core/BindingExpressionTests.cs
  56. 9 5
      tests/Avalonia.Base.UnitTests/Data/DefaultValueConverterTests.cs
  57. 2 1
      tests/Avalonia.Benchmarks/NullRenderer.cs
  58. 3 0
      tests/Avalonia.Benchmarks/NullThreadingPlatform.cs
  59. 0 1
      tests/Avalonia.Controls.UnitTests/Avalonia.Controls.UnitTests.csproj
  60. 1 1
      tests/Avalonia.Controls.UnitTests/BorderTests.cs
  61. 1 1
      tests/Avalonia.Controls.UnitTests/PanelTests.cs
  62. 5 5
      tests/Avalonia.Controls.UnitTests/Platform/DefaultMenuInteractionHandlerTests.cs
  63. 1 1
      tests/Avalonia.Controls.UnitTests/Presenters/ContentPresenterTests_Standalone.cs
  64. 2 2
      tests/Avalonia.Controls.UnitTests/TextBlockTests.cs
  65. 15 5
      tests/Avalonia.Controls.UnitTests/TreeViewTests.cs
  66. 8 5
      tests/Avalonia.DesignerSupport.TestApp/App.xaml.cs
  67. 5 15
      tests/Avalonia.DesignerSupport.TestApp/Program.cs
  68. 3 3
      tests/Avalonia.Layout.UnitTests/LayoutableTests.cs
  69. 2 0
      tests/Avalonia.Layout.UnitTests/LayoutableTests_EffectiveViewportChanged.cs
  70. 4 3
      tests/Avalonia.LeakTests/ControlTests.cs
  71. 14 1
      tests/Avalonia.Markup.UnitTests/Parsers/ExpressionObserverBuilderTests_Negation.cs
  72. 2 0
      tests/Avalonia.RenderTests/Media/BitmapTests.cs
  73. 6 6
      tests/Avalonia.Styling.UnitTests/ResourceDictionaryTests.cs
  74. 0 75
      tests/Avalonia.Styling.UnitTests/SelectorTests_Child.cs
  75. 0 74
      tests/Avalonia.Styling.UnitTests/SelectorTests_Descendent.cs
  76. 1 1
      tests/Avalonia.Styling.UnitTests/StyleTests.cs
  77. 4 4
      tests/Avalonia.Styling.UnitTests/StylesTests.cs
  78. 2 0
      tests/Avalonia.UnitTests/Avalonia.UnitTests.csproj
  79. 1 1
      tests/Avalonia.Visuals.UnitTests/Rendering/DeferredRendererTests.cs
  80. 1 1
      tests/Avalonia.Visuals.UnitTests/VisualTests.cs

+ 4 - 0
azure-pipelines.yml

@@ -31,6 +31,8 @@ jobs:
     condition: not(canceled())
      
 - job: macOS
+  variables:
+    SolutionDir: '$(Build.SourcesDirectory)'
   pool:
     vmImage: 'macOS-10.14'
   steps:
@@ -97,6 +99,8 @@ jobs:
 - job: Windows
   pool:
     vmImage: 'windows-2019'
+  variables:
+    SolutionDir: '$(Build.SourcesDirectory)'
   steps:
   - task: UseDotNet@2
     displayName: 'Use .NET Core SDK 3.1.401'

BIN
build/Assets/Icon.png


+ 7 - 1
build/SharedVersion.props

@@ -10,10 +10,16 @@
     <NoWarn>CS1591</NoWarn>
     <LangVersion>latest</LangVersion>
     <PackageLicenseExpression>MIT</PackageLicenseExpression>
-    <PackageIconUrl>https://avatars2.githubusercontent.com/u/14075148?s=200</PackageIconUrl>
+    <PackageIcon>Icon.png</PackageIcon>
     <PackageDescription>Avalonia is a WPF/UWP-inspired cross-platform XAML-based UI framework providing a flexible styling system and supporting a wide range of Operating Systems such as Windows (.NET Framework, .NET Core), Linux (via Xorg), MacOS and with experimental support for Android and iOS.</PackageDescription>
     <PackageTags>avalonia;avaloniaui;mvvm;rx;reactive extensions;android;ios;mac;forms;wpf;net;netstandard;net461;uwp;xamarin</PackageTags>
     <PackageReleaseNotes>https://github.com/AvaloniaUI/Avalonia/releases</PackageReleaseNotes>
     <RepositoryType>git</RepositoryType>
+    <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)\avalonia.snk</AssemblyOriginatorKeyFile>
+    <SignAssembly>True</SignAssembly>
   </PropertyGroup>
+
+  <ItemGroup Label="PackageIcon">
+    <None Include="$(SolutionDir)/build/Assets/Icon.png" Pack="true" PackagePath=""/>
+  </ItemGroup>
 </Project>

+ 2 - 2
build/SourceLink.props

@@ -1,5 +1,5 @@
 <Project>
   <ItemGroup>
-    <PackageReference Include="SourceLink.Create.CommandLine" Version="2.8.0" PrivateAssets="All" />
+    <PackageReference Include="SourceLink.Create.CommandLine" Version="2.8.3" PrivateAssets="All" />
   </ItemGroup>
-</Project>
+</Project>

+ 4 - 0
build/XUnit.props

@@ -11,4 +11,8 @@
     <PackageReference Include="Xunit.SkippableFact" Version="1.3.6" />
     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.0" />
   </ItemGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)\avalonia.snk</AssemblyOriginatorKeyFile>
+    <SignAssembly>True</SignAssembly>
+  </PropertyGroup>
 </Project>

BIN
build/avalonia.snk


+ 1 - 0
dirs.proj

@@ -21,6 +21,7 @@
   <ItemGroup Condition="!$([MSBuild]::IsOsPlatform('Windows')) OR '$(MSBuildRuntimeType)' != 'Full'">
     <ProjectReference Remove="src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj" />
     <ProjectReference Remove="samples/interop/**/*.*proj" />
+    <ProjectReference Remove="samples/ControlCatalog.Desktop/*.*proj" />
   </ItemGroup>
 
   <ItemGroup>

+ 2 - 1
nukebuild/BuildTasksPatcher.cs

@@ -29,7 +29,8 @@ public class BuildTasksPatcher
                             InputAssemblies = new[]
                             {
                                 temp, typeof(Mono.Cecil.AssemblyDefinition).Assembly.GetModules()[0]
-                                    .FullyQualifiedName
+                                    .FullyQualifiedName,
+                                typeof(Mono.Cecil.Rocks.MethodBodyRocks).Assembly.GetModules()[0].FullyQualifiedName
                             },
                             SearchDirectories = new string[0],
                             OutputFile = output

+ 1 - 1
nukebuild/_build.csproj

@@ -16,7 +16,7 @@
     <PackageReference Include="vswhere" Version="2.6.7" Condition=" '$(OS)' == 'Windows_NT' " />
     <PackageReference Include="ILRepack.NETStandard" Version="2.0.4" />
     <!-- Keep in sync with Avalonia.Build.Tasks -->
-    <PackageReference Include="Avalonia.Unofficial.Cecil" Version="20190417.2.0" />
+    <PackageReference Include="Mono.Cecil" Version="0.11.2" />
     <PackageReference Include="Pharmacist.Core" Version="1.8.1" />
   </ItemGroup>
 

+ 3 - 0
packages/Avalonia/AvaloniaBuildTasks.targets

@@ -87,6 +87,9 @@
       ProjectDirectory="$(MSBuildProjectDirectory)"
       VerifyIl="$(AvaloniaXamlIlVerifyIl)"
       ReportImportance="$(AvaloniaXamlReportImportance)"
+      AssemblyOriginatorKeyFile="$(AssemblyOriginatorKeyFile)"
+      SignAssembly="$(SignAssembly)"
+      DelaySign="$(DelaySign)"
     />
     <Exec
       Condition="'$(_AvaloniaUseExternalMSBuild)' == 'true'"

+ 13 - 7
samples/BindingDemo/App.xaml.cs

@@ -1,6 +1,5 @@
-using System;
 using Avalonia;
-using Avalonia.Controls;
+using Avalonia.Controls.ApplicationLifetimes;
 using Avalonia.Markup.Xaml;
 using Avalonia.ReactiveUI;
 
@@ -13,13 +12,20 @@ namespace BindingDemo
             AvaloniaXamlLoader.Load(this);
         }
 
-        private static void Main()
+        public override void OnFrameworkInitializationCompleted()
         {
-            AppBuilder.Configure<App>()
+            if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
+                desktop.MainWindow = new MainWindow();
+            base.OnFrameworkInitializationCompleted();
+        }
+
+        public static int Main(string[] args)
+            => BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
+
+        public static AppBuilder BuildAvaloniaApp()
+          => AppBuilder.Configure<App>()
                 .UsePlatformDetect()
                 .UseReactiveUI()
-                .LogToDebug()
-                .Start<MainWindow>();
-        }
+                .LogToDebug();
     }
 }

+ 2 - 6
samples/ControlCatalog.Desktop/Program.cs

@@ -10,12 +10,8 @@ namespace ControlCatalog
     internal class Program
     {
         [STAThread]
-        static void Main(string[] args)
-        {
-            // TODO: Make this work with GTK/Skia/Cairo depending on command-line args
-            // again.
-            BuildAvaloniaApp().Start<MainWindow>();
-        }
+        public static int Main(string[] args)
+            => BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
 
         /// <summary>
         /// This method is needed for IDE previewer infrastructure

+ 0 - 1
samples/ControlCatalog.NetCore/ControlCatalog.NetCore.csproj

@@ -11,7 +11,6 @@
     <ProjectReference Include="..\..\src\Avalonia.Dialogs\Avalonia.Dialogs.csproj" />
     <ProjectReference Include="..\..\src\Linux\Avalonia.LinuxFramebuffer\Avalonia.LinuxFramebuffer.csproj" />
     <ProjectReference Include="..\ControlCatalog\ControlCatalog.csproj" />
-    <ProjectReference Include="..\..\src\Avalonia.Desktop\Avalonia.Desktop.csproj" />
     <ProjectReference Include="..\..\src\Avalonia.X11\Avalonia.X11.csproj" />
     <PackageReference Include="Avalonia.Angle.Windows.Natives" Version="2.1.0.2019013001" />
   </ItemGroup>

+ 9 - 1
samples/Previewer/App.xaml.cs

@@ -1,4 +1,5 @@
 using Avalonia;
+using Avalonia.Controls.ApplicationLifetimes;
 using Avalonia.Markup.Xaml;
 
 namespace Previewer
@@ -9,6 +10,13 @@ namespace Previewer
         {
             AvaloniaXamlLoader.Load(this);
         }
+
+        public override void OnFrameworkInitializationCompleted()
+        {
+            if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
+                desktop.MainWindow = new MainWindow();
+            base.OnFrameworkInitializationCompleted();
+        }
     }
 
-}
+}

+ 8 - 7
samples/Previewer/Program.cs

@@ -1,13 +1,14 @@
-using System;
-using Avalonia;
+using Avalonia;
 
 namespace Previewer
 {
     class Program
     {
-        static void Main(string[] args)
-        {
-            AppBuilder.Configure<App>().UsePlatformDetect().Start<MainWindow>();
-        }
+        public static AppBuilder BuildAvaloniaApp()
+          => AppBuilder.Configure<App>()
+                .UsePlatformDetect();
+
+        public static int Main(string[] args)
+          => BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
     }
-}
+}

+ 10 - 1
samples/RenderDemo/App.xaml.cs

@@ -1,4 +1,5 @@
 using Avalonia;
+using Avalonia.Controls.ApplicationLifetimes;
 using Avalonia.Markup.Xaml;
 using Avalonia.ReactiveUI;
 
@@ -11,9 +12,17 @@ namespace RenderDemo
             AvaloniaXamlLoader.Load(this);
         }
 
+        public override void OnFrameworkInitializationCompleted()
+        {
+            if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
+                desktop.MainWindow = new MainWindow();
+            base.OnFrameworkInitializationCompleted();
+        }
+
         // TODO: Make this work with GTK/Skia/Cairo depending on command-line args
         // again.
-        static void Main(string[] args) => BuildAvaloniaApp().Start<MainWindow>();
+        static void Main(string[] args) 
+            => BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
 
         // App configuration, used by the entry point and previewer
         static AppBuilder BuildAvaloniaApp()

+ 3 - 3
samples/RenderDemo/Pages/GlyphRunPage.xaml

@@ -6,9 +6,9 @@
              x:Class="RenderDemo.Pages.GlyphRunPage">
   <Border
     Background="White">
-    <DrawingPresenter
-      x:Name="drawingPresenter"
+    <Image
+      x:Name="imageControl"
       Stretch="None">
-    </DrawingPresenter>
+    </Image>
   </Border>
 </UserControl>

+ 4 - 3
samples/RenderDemo/Pages/GlyphRunPage.xaml.cs

@@ -9,7 +9,7 @@ namespace RenderDemo.Pages
 {
     public class GlyphRunPage : UserControl
     {
-        private DrawingPresenter _drawingPresenter;
+        private Image _imageControl;
         private GlyphTypeface _glyphTypeface = Typeface.Default.GlyphTypeface;
         private readonly Random _rand = new Random();
         private ushort[] _glyphIndices = new ushort[1];
@@ -25,7 +25,8 @@ namespace RenderDemo.Pages
         {
             AvaloniaXamlLoader.Load(this);
 
-            _drawingPresenter = this.FindControl<DrawingPresenter>("drawingPresenter");
+            _imageControl = this.FindControl<Image>("imageControl");
+            _imageControl.Source = new DrawingImage();
 
             DispatcherTimer.Run(() =>
             {
@@ -73,7 +74,7 @@ namespace RenderDemo.Pages
 
             drawingGroup.Children.Add(geometryDrawing);
 
-            _drawingPresenter.Drawing = drawingGroup;
+            (_imageControl.Source as DrawingImage).Drawing = drawingGroup;
         }
     }
 }

+ 8 - 0
samples/VirtualizationDemo/App.xaml.cs

@@ -1,4 +1,5 @@
 using Avalonia;
+using Avalonia.Controls.ApplicationLifetimes;
 using Avalonia.Markup.Xaml;
 
 namespace VirtualizationDemo
@@ -9,5 +10,12 @@ namespace VirtualizationDemo
         {
             AvaloniaXamlLoader.Load(this);
         }
+
+        public override void OnFrameworkInitializationCompleted()
+        {
+            if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
+                desktop.MainWindow = new MainWindow();
+            base.OnFrameworkInitializationCompleted();
+        }
     }
 }

+ 9 - 11
samples/VirtualizationDemo/Program.cs

@@ -1,19 +1,17 @@
-using System;
-using Avalonia;
-using Avalonia.Controls;
+using Avalonia;
 using Avalonia.ReactiveUI;
 
 namespace VirtualizationDemo
 {
     class Program
     {
-        static void Main(string[] args)
-        {
-            AppBuilder.Configure<App>()
-               .UsePlatformDetect()
-               .UseReactiveUI()
-               .LogToDebug()
-               .Start<MainWindow>();
-        }
+        public static AppBuilder BuildAvaloniaApp()
+            => AppBuilder.Configure<App>()
+                .UsePlatformDetect()
+                .UseReactiveUI()
+                .LogToDebug();
+
+        public static int Main(string[] args)
+            => BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
     }
 }

+ 8 - 0
samples/interop/Direct3DInteropSample/App.paml.cs

@@ -1,4 +1,5 @@
 using Avalonia;
+using Avalonia.Controls.ApplicationLifetimes;
 using Avalonia.Markup.Xaml;
 
 namespace Direct3DInteropSample
@@ -9,5 +10,12 @@ namespace Direct3DInteropSample
         {
             AvaloniaXamlLoader.Load(this);
         }
+
+        public override void OnFrameworkInitializationCompleted()
+        {
+            if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
+                desktop.MainWindow = new MainWindow();
+            base.OnFrameworkInitializationCompleted();
+        }
     }
 }

+ 9 - 12
samples/interop/Direct3DInteropSample/Program.cs

@@ -1,19 +1,16 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Avalonia;
+using Avalonia;
 
 namespace Direct3DInteropSample
 {
     class Program
     {
-        static void Main(string[] args)
-        {
-            AppBuilder.Configure<App>()
-                .With(new Win32PlatformOptions {UseDeferredRendering = false})
-                .UseWin32().UseDirect2D1().Start<MainWindow>();
-        }
+        public static AppBuilder BuildAvaloniaApp()
+            => AppBuilder.Configure<App>()
+                .With(new Win32PlatformOptions { UseDeferredRendering = false })
+                .UseWin32()
+                .UseDirect2D1();
+
+        public static int Main(string[] args)
+            => BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
     }
 }

+ 0 - 1
samples/interop/NativeEmbedSample/NativeEmbedSample.csproj

@@ -9,7 +9,6 @@
 
   <ItemGroup>
     <PackageReference Include="MonoMac.NetStandard" Version="0.0.4" />
-    <ProjectReference Include="..\..\..\src\Avalonia.Desktop\Avalonia.Desktop.csproj" />
     <ProjectReference Include="..\..\..\src\Windows\Avalonia.Direct2D1\Avalonia.Direct2D1.csproj" />
     <ProjectReference Include="..\..\..\src\Avalonia.Diagnostics\Avalonia.Diagnostics.csproj" />
     <ProjectReference Include="..\..\..\src\Avalonia.X11\Avalonia.X11.csproj" />

+ 2 - 2
src/Avalonia.Animation/Properties/AssemblyInfo.cs

@@ -6,5 +6,5 @@ using System.Runtime.CompilerServices;
 [assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Animation.Easings")]
 [assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Animation.Animators")]
 
-[assembly: InternalsVisibleTo("Avalonia.LeakTests")]
-[assembly: InternalsVisibleTo("Avalonia.Animation.UnitTests")]
+[assembly: InternalsVisibleTo("Avalonia.LeakTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1bba1142285fe0419326fb25866ba62c47e6c2b5c1ab0c95b46413fad375471232cb81706932e1cef38781b9ebd39d5100401bacb651c6c5bbf59e571e81b3bc08d2a622004e08b1a6ece82a7e0b9857525c86d2b95fab4bc3dce148558d7f3ae61aa3a234086902aeface87d9dfdd32b9d2fe3c6dd4055b5ab4b104998bd87")]
+[assembly: InternalsVisibleTo("Avalonia.Animation.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1bba1142285fe0419326fb25866ba62c47e6c2b5c1ab0c95b46413fad375471232cb81706932e1cef38781b9ebd39d5100401bacb651c6c5bbf59e571e81b3bc08d2a622004e08b1a6ece82a7e0b9857525c86d2b95fab4bc3dce148558d7f3ae61aa3a234086902aeface87d9dfdd32b9d2fe3c6dd4055b5ab4b104998bd87")]

+ 5 - 5
src/Avalonia.Base/Properties/AssemblyInfo.cs

@@ -5,8 +5,8 @@ using System.Runtime.CompilerServices;
 using Avalonia.Metadata;
 
 [assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Data.Converters")]
-[assembly: InternalsVisibleTo("Avalonia.Base.UnitTests")]
-[assembly: InternalsVisibleTo("Avalonia.UnitTests")]
-[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]
-[assembly: InternalsVisibleTo("Avalonia.Controls.DataGrid")]
-[assembly: InternalsVisibleTo("Avalonia.Markup.Xaml.UnitTests")]
+[assembly: InternalsVisibleTo("Avalonia.Base.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1bba1142285fe0419326fb25866ba62c47e6c2b5c1ab0c95b46413fad375471232cb81706932e1cef38781b9ebd39d5100401bacb651c6c5bbf59e571e81b3bc08d2a622004e08b1a6ece82a7e0b9857525c86d2b95fab4bc3dce148558d7f3ae61aa3a234086902aeface87d9dfdd32b9d2fe3c6dd4055b5ab4b104998bd87")]
+[assembly: InternalsVisibleTo("Avalonia.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1bba1142285fe0419326fb25866ba62c47e6c2b5c1ab0c95b46413fad375471232cb81706932e1cef38781b9ebd39d5100401bacb651c6c5bbf59e571e81b3bc08d2a622004e08b1a6ece82a7e0b9857525c86d2b95fab4bc3dce148558d7f3ae61aa3a234086902aeface87d9dfdd32b9d2fe3c6dd4055b5ab4b104998bd87")]
+[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] 
+[assembly: InternalsVisibleTo("Avalonia.Controls.DataGrid, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1bba1142285fe0419326fb25866ba62c47e6c2b5c1ab0c95b46413fad375471232cb81706932e1cef38781b9ebd39d5100401bacb651c6c5bbf59e571e81b3bc08d2a622004e08b1a6ece82a7e0b9857525c86d2b95fab4bc3dce148558d7f3ae61aa3a234086902aeface87d9dfdd32b9d2fe3c6dd4055b5ab4b104998bd87")]
+[assembly: InternalsVisibleTo("Avalonia.Markup.Xaml.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1bba1142285fe0419326fb25866ba62c47e6c2b5c1ab0c95b46413fad375471232cb81706932e1cef38781b9ebd39d5100401bacb651c6c5bbf59e571e81b3bc08d2a622004e08b1a6ece82a7e0b9857525c86d2b95fab4bc3dce148558d7f3ae61aa3a234086902aeface87d9dfdd32b9d2fe3c6dd4055b5ab4b104998bd87")]

+ 1 - 1
src/Avalonia.Build.Tasks/Avalonia.Build.Tasks.csproj

@@ -59,7 +59,7 @@
       </Compile>
       <Compile Remove="../Markup/Avalonia.Markup.Xaml.Loader\xamlil.github\**\obj\**\*.cs" />
       <Compile Remove="../Markup/Avalonia.Markup.Xaml.Loader\xamlil.github\src\XamlX\IL\SreTypeSystem.cs" />
-      <PackageReference Include="Avalonia.Unofficial.Cecil" Version="20190417.2.0" PrivateAssets="All" />
+      <PackageReference Include="Mono.Cecil" Version="0.11.2" />
       <PackageReference Include="Microsoft.Build.Framework" Version="15.1.548" PrivateAssets="All" />
     </ItemGroup>
 </Project>

+ 7 - 1
src/Avalonia.Build.Tasks/CompileAvaloniaXamlTask.cs

@@ -39,7 +39,9 @@ namespace Avalonia.Build.Tasks
 
             var res = XamlCompilerTaskExecutor.Compile(BuildEngine, input,
                 File.ReadAllLines(ReferencesFilePath).Where(l => !string.IsNullOrWhiteSpace(l)).ToArray(),
-                ProjectDirectory, OutputPath, VerifyIl, outputImportance);
+                ProjectDirectory, OutputPath, VerifyIl, outputImportance,
+                (SignAssembly && !DelaySign) ? AssemblyOriginatorKeyFile : null
+                );
             if (!res.Success)
                 return false;
             if (!res.WrittenFile)
@@ -73,6 +75,10 @@ namespace Avalonia.Build.Tasks
         public string OutputPath { get; set; }
 
         public bool VerifyIl { get; set; }
+        
+        public string AssemblyOriginatorKeyFile { get; set; }
+        public bool SignAssembly { get; set; }
+        public bool DelaySign { get; set; }
 
         public string ReportImportance { get; set; }
 

+ 21 - 5
src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs

@@ -42,7 +42,7 @@ namespace Avalonia.Build.Tasks
         }
         
         public static CompileResult Compile(IBuildEngine engine, string input, string[] references, string projectDirectory,
-            string output, bool verifyIl, MessageImportance logImportance)
+            string output, bool verifyIl, MessageImportance logImportance, string strongNameKey)
         {
             var typeSystem = new CecilTypeSystem(references.Concat(new[] {input}), input);
             var asm = typeSystem.TargetAssemblyDefinition;
@@ -345,6 +345,20 @@ namespace Avalonia.Build.Tasks
                     }
                     res.Remove();
                 }
+                
+                
+                // Technically that's a hack, but it fixes corert incompatibility caused by deterministic builds
+                int dupeCounter = 1;
+                foreach (var grp in typeDef.NestedTypes.GroupBy(x => x.Name))
+                {
+                    if (grp.Count() > 1)
+                    {
+                        foreach (var dupe in grp)
+                            dupe.Name += "_dup" + dupeCounter++;
+                    }
+                }
+                
+                
                 return true;
             }
             
@@ -361,10 +375,12 @@ namespace Avalonia.Build.Tasks
             loaderDispatcherMethod.Body.Instructions.Add(Instruction.Create(OpCodes.Ldnull));
             loaderDispatcherMethod.Body.Instructions.Add(Instruction.Create(OpCodes.Ret));
             
-            asm.Write(output, new WriterParameters
-            {
-                WriteSymbols = asm.MainModule.HasSymbols
-            });
+            
+            var writerParameters = new WriterParameters { WriteSymbols = asm.MainModule.HasSymbols };
+            if (!string.IsNullOrWhiteSpace(strongNameKey))
+                writerParameters.StrongNameKeyBlob = File.ReadAllBytes(strongNameKey);
+
+            asm.Write(output, writerParameters);
 
             return new CompileResult(true, true);
         }

+ 1 - 0
src/Avalonia.Controls.DataGrid/DataGridColumn.cs

@@ -665,6 +665,7 @@ namespace Avalonia.Controls
         /// <param name="dataItem">
         /// The data item represented by the row that contains the intended cell.
         /// </param>
+        /// <param name="binding">When the method returns, contains the applied binding.</param>
         /// <returns>
         /// A new editing element that is bound to the column's <see cref="P:Avalonia.Controls.DataGridBoundColumn.Binding" /> property value.
         /// </returns>

+ 2 - 2
src/Avalonia.Controls.DataGrid/Properties/AssemblyInfo.cs

@@ -2,8 +2,8 @@ using System.Reflection;
 using System.Runtime.CompilerServices;
 using Avalonia.Metadata;
 
-[assembly: InternalsVisibleTo("Avalonia.Controls.DataGrid.UnitTests")]
-[assembly: InternalsVisibleTo("Avalonia.DesignerSupport")]
+[assembly: InternalsVisibleTo("Avalonia.Controls.DataGrid.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1bba1142285fe0419326fb25866ba62c47e6c2b5c1ab0c95b46413fad375471232cb81706932e1cef38781b9ebd39d5100401bacb651c6c5bbf59e571e81b3bc08d2a622004e08b1a6ece82a7e0b9857525c86d2b95fab4bc3dce148558d7f3ae61aa3a234086902aeface87d9dfdd32b9d2fe3c6dd4055b5ab4b104998bd87")]
+[assembly: InternalsVisibleTo("Avalonia.DesignerSupport, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1bba1142285fe0419326fb25866ba62c47e6c2b5c1ab0c95b46413fad375471232cb81706932e1cef38781b9ebd39d5100401bacb651c6c5bbf59e571e81b3bc08d2a622004e08b1a6ece82a7e0b9857525c86d2b95fab4bc3dce148558d7f3ae61aa3a234086902aeface87d9dfdd32b9d2fe3c6dd4055b5ab4b104998bd87")]
 
 [assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Controls")]
 [assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Controls.Collections")]

+ 1 - 0
src/Avalonia.Controls/Primitives/IPopupHost.cs

@@ -47,6 +47,7 @@ namespace Avalonia.Controls.Primitives
         /// <param name="offset">The offset, in device-independent pixels.</param>
         /// <param name="anchor">The anchor point.</param>
         /// <param name="gravity">The popup gravity.</param>
+        /// <param name="constraintAdjustment">Defines how a popup position will be adjusted if the unadjusted position would result in the popup being partly constrained.</param>
         /// <param name="rect">
         /// The anchor rect. If null, the bounds of <paramref name="target"/> will be used.
         /// </param>

+ 2 - 2
src/Avalonia.Controls/Properties/AssemblyInfo.cs

@@ -2,8 +2,8 @@ using System.Reflection;
 using System.Runtime.CompilerServices;
 using Avalonia.Metadata;
 
-[assembly: InternalsVisibleTo("Avalonia.Controls.UnitTests")]
-[assembly: InternalsVisibleTo("Avalonia.DesignerSupport")]
+[assembly: InternalsVisibleTo("Avalonia.Controls.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1bba1142285fe0419326fb25866ba62c47e6c2b5c1ab0c95b46413fad375471232cb81706932e1cef38781b9ebd39d5100401bacb651c6c5bbf59e571e81b3bc08d2a622004e08b1a6ece82a7e0b9857525c86d2b95fab4bc3dce148558d7f3ae61aa3a234086902aeface87d9dfdd32b9d2fe3c6dd4055b5ab4b104998bd87")]
+[assembly: InternalsVisibleTo("Avalonia.DesignerSupport, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1bba1142285fe0419326fb25866ba62c47e6c2b5c1ab0c95b46413fad375471232cb81706932e1cef38781b9ebd39d5100401bacb651c6c5bbf59e571e81b3bc08d2a622004e08b1a6ece82a7e0b9857525c86d2b95fab4bc3dce148558d7f3ae61aa3a234086902aeface87d9dfdd32b9d2fe3c6dd4055b5ab4b104998bd87")]
 
 [assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia")]
 [assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Controls")]

+ 1 - 1
src/Avalonia.Controls/Window.cs

@@ -451,7 +451,7 @@ namespace Avalonia.Controls
         /// </summary>
         /// <param name="dialogResult">The dialog result.</param>
         /// <remarks>
-        /// When the window is shown with the <see cref="ShowDialog{TResult}(IWindowImpl)"/>
+        /// When the window is shown with the <see cref="ShowDialog{TResult}(Window)"/>
         /// or <see cref="ShowDialog{TResult}(Window)"/> method, the
         /// resulting task will produce the <see cref="_dialogResult"/> value when the window
         /// is closed.

+ 1 - 3
src/Avalonia.FreeDesktop/Avalonia.FreeDesktop.csproj

@@ -6,9 +6,7 @@
 
   <ItemGroup>
     <ProjectReference Include="..\Avalonia.Controls\Avalonia.Controls.csproj" />
+    <PackageReference Include="Tmds.DBus" Version="0.9.0" />
   </ItemGroup>
 
-  <ItemGroup>
-    <PackageReference Include="Tmds.DBus" Version="0.7.0" />
-  </ItemGroup>  
 </Project>

+ 1 - 1
src/Avalonia.Layout/Properties/AssemblyInfo.cs

@@ -1,7 +1,7 @@
 using System.Runtime.CompilerServices;
 using Avalonia.Metadata;
 
-[assembly: InternalsVisibleTo("Avalonia.Layout.UnitTests")]
+[assembly: InternalsVisibleTo("Avalonia.Layout.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1bba1142285fe0419326fb25866ba62c47e6c2b5c1ab0c95b46413fad375471232cb81706932e1cef38781b9ebd39d5100401bacb651c6c5bbf59e571e81b3bc08d2a622004e08b1a6ece82a7e0b9857525c86d2b95fab4bc3dce148558d7f3ae61aa3a234086902aeface87d9dfdd32b9d2fe3c6dd4055b5ab4b104998bd87")]
 
 [assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Layout")]
 

+ 1 - 1
src/Avalonia.Styling/Properties/AssemblyInfo.cs

@@ -5,4 +5,4 @@ using Avalonia.Metadata;
 [assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Controls")]
 [assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.LogicalTree")]
 [assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Styling")]
-[assembly: InternalsVisibleTo("Avalonia.Styling.UnitTests")]
+[assembly: InternalsVisibleTo("Avalonia.Styling.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1bba1142285fe0419326fb25866ba62c47e6c2b5c1ab0c95b46413fad375471232cb81706932e1cef38781b9ebd39d5100401bacb651c6c5bbf59e571e81b3bc08d2a622004e08b1a6ece82a7e0b9857525c86d2b95fab4bc3dce148558d7f3ae61aa3a234086902aeface87d9dfdd32b9d2fe3c6dd4055b5ab4b104998bd87")]

+ 0 - 1
src/Avalonia.Visuals/Media/Imaging/Bitmap.cs

@@ -99,7 +99,6 @@ namespace Avalonia.Media.Imaging
         /// Initializes a new instance of the <see cref="Bitmap"/> class.
         /// </summary>
         /// <param name="format">The pixel format.</param>
-        /// <param name="alphaFormat">The alpha format.</param>
         /// <param name="data">The pointer to the source bytes.</param>
         /// <param name="size">The size of the bitmap in device pixels.</param>
         /// <param name="dpi">The DPI of the bitmap.</param>

+ 1 - 1
src/Avalonia.Visuals/Platform/IDrawingContextImpl.cs

@@ -69,7 +69,7 @@ namespace Avalonia.Platform
         /// If the pen is null, then no stoke is performed. If both the pen and the brush are null, then the drawing is not visible.
         /// </remarks>
         void DrawRectangle(IBrush brush, IPen pen, RoundedRect rect,
-            BoxShadows boxShadow = default);
+            BoxShadows boxShadows = default);
 
         /// <summary>
         /// Draws text.

+ 4 - 4
src/Avalonia.Visuals/Properties/AssemblyInfo.cs

@@ -2,13 +2,13 @@ using System.Reflection;
 using System.Runtime.CompilerServices;
 using Avalonia.Metadata;
 
-[assembly: InternalsVisibleTo("Avalonia.Visuals.UnitTests")]
+[assembly: InternalsVisibleTo("Avalonia.Visuals.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1bba1142285fe0419326fb25866ba62c47e6c2b5c1ab0c95b46413fad375471232cb81706932e1cef38781b9ebd39d5100401bacb651c6c5bbf59e571e81b3bc08d2a622004e08b1a6ece82a7e0b9857525c86d2b95fab4bc3dce148558d7f3ae61aa3a234086902aeface87d9dfdd32b9d2fe3c6dd4055b5ab4b104998bd87")]
 [assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Animation")]
 [assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Media")]
 [assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Media.Imaging")]
 [assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Media.Transformation")]
 [assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia")]
 
-[assembly: InternalsVisibleTo("Avalonia.Direct2D1.RenderTests")]
-[assembly: InternalsVisibleTo("Avalonia.Skia.RenderTests")]
-[assembly: InternalsVisibleTo("Avalonia.Skia.UnitTests")]
+[assembly: InternalsVisibleTo("Avalonia.Direct2D1.RenderTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1bba1142285fe0419326fb25866ba62c47e6c2b5c1ab0c95b46413fad375471232cb81706932e1cef38781b9ebd39d5100401bacb651c6c5bbf59e571e81b3bc08d2a622004e08b1a6ece82a7e0b9857525c86d2b95fab4bc3dce148558d7f3ae61aa3a234086902aeface87d9dfdd32b9d2fe3c6dd4055b5ab4b104998bd87")]
+[assembly: InternalsVisibleTo("Avalonia.Skia.RenderTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1bba1142285fe0419326fb25866ba62c47e6c2b5c1ab0c95b46413fad375471232cb81706932e1cef38781b9ebd39d5100401bacb651c6c5bbf59e571e81b3bc08d2a622004e08b1a6ece82a7e0b9857525c86d2b95fab4bc3dce148558d7f3ae61aa3a234086902aeface87d9dfdd32b9d2fe3c6dd4055b5ab4b104998bd87")]
+[assembly: InternalsVisibleTo("Avalonia.Skia.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1bba1142285fe0419326fb25866ba62c47e6c2b5c1ab0c95b46413fad375471232cb81706932e1cef38781b9ebd39d5100401bacb651c6c5bbf59e571e81b3bc08d2a622004e08b1a6ece82a7e0b9857525c86d2b95fab4bc3dce148558d7f3ae61aa3a234086902aeface87d9dfdd32b9d2fe3c6dd4055b5ab4b104998bd87")]

+ 3 - 4
src/Avalonia.Visuals/Rendering/SceneGraph/ExperimentalAcrylicNode.cs

@@ -13,10 +13,9 @@ namespace Avalonia.Rendering.SceneGraph
         /// <summary>
         /// Initializes a new instance of the <see cref="RectangleNode"/> class.
         /// </summary>
-        /// <param name="transform">The transform.</param>        
+        /// <param name="transform">The transform.</param>
+        /// <param name="material"></param>        
         /// <param name="rect">The rectangle to draw.</param>
-        /// <param name="boxShadow">The box shadow parameters</param>
-        /// <param name="childScenes">Child scenes for drawing visual brushes.</param>
         public ExperimentalAcrylicNode(
             Matrix transform,
             IExperimentalAcrylicMaterial material,
@@ -44,7 +43,7 @@ namespace Avalonia.Rendering.SceneGraph
         /// Determines if this draw operation equals another.
         /// </summary>
         /// <param name="transform">The transform of the other draw operation.</param>
-        /// <param name="brush">The fill of the other draw operation.</param>
+        /// <param name="material">The fill of the other draw operation.</param>
         /// <param name="rect">The rectangle of the other draw operation.</param>        
         /// <returns>True if the draw operations are the same, otherwise false.</returns>
         /// <remarks>

+ 0 - 1
src/Avalonia.Visuals/Rendering/SceneGraph/GeometryNode.cs

@@ -63,7 +63,6 @@ namespace Avalonia.Rendering.SceneGraph
         /// <param name="brush">The fill of the other draw operation.</param>
         /// <param name="pen">The stroke of the other draw operation.</param>
         /// <param name="geometry">The geometry of the other draw operation.</param>
-        /// <param name="boxShadow">The box shadow parameters</param>
         /// <returns>True if the draw operations are the same, otherwise false.</returns>
         /// <remarks>
         /// The properties of the other draw operation are passed in as arguments to prevent

+ 1 - 1
src/Avalonia.Visuals/Rendering/SceneGraph/RectangleNode.cs

@@ -73,7 +73,7 @@ namespace Avalonia.Rendering.SceneGraph
         /// <param name="brush">The fill of the other draw operation.</param>
         /// <param name="pen">The stroke of the other draw operation.</param>
         /// <param name="rect">The rectangle of the other draw operation.</param>
-        /// <param name="boxShadow">The box shadow parameters of the other draw operation</param>
+        /// <param name="boxShadows">The box shadow parameters of the other draw operation</param>
         /// <returns>True if the draw operations are the same, otherwise false.</returns>
         /// <remarks>
         /// The properties of the other draw operation are passed in as arguments to prevent

+ 8 - 8
src/Linux/Avalonia.LinuxFramebuffer/Output/Drm.cs

@@ -113,22 +113,22 @@ namespace Avalonia.LinuxFramebuffer.Output
         [StructLayout(LayoutKind.Sequential)]
         public struct drmModeConnector {
             public uint connector_id;
-            public uint encoder_id; /**< Encoder currently connected to */
+            public uint encoder_id; // Encoder currently connected to 
             public uint connector_type;
             public uint connector_type_id;
             public DrmModeConnection connection;
-            public uint mmWidth, mmHeight; /**< HxW in millimeters */
+            public uint mmWidth, mmHeight; //  HxW in millimeters 
             public DrmModeSubPixel subpixel;
 
             public int count_modes;
             public drmModeModeInfo* modes;
 
             public int count_props;
-            public uint *props; /**< List of property ids */
-            public ulong *prop_values; /**< List of property values */
+            public uint *props; // List of property ids 
+            public ulong *prop_values; // List of property values 
 
             public int count_encoders;
-            public uint *encoders; /**< List of encoder ids */
+            public uint *encoders; //List of encoder ids
         }
         
         [StructLayout(LayoutKind.Sequential)]
@@ -143,14 +143,14 @@ namespace Avalonia.LinuxFramebuffer.Output
         [StructLayout(LayoutKind.Sequential)]
         public struct drmModeCrtc {
             public uint crtc_id;
-            public uint buffer_id; /**< FB id to connect to 0 = disconnect */
+            public uint buffer_id; // FB id to connect to 0 = disconnect 
 
-            public uint x, y; /**< Position on the framebuffer */
+            public uint x, y; // Position on the framebuffer 
             public uint width, height;
             public int mode_valid;
             public drmModeModeInfo mode;
 
-            public int gamma_size; /**< Number of gamma stops */
+            public int gamma_size; // Number of gamma stops 
 
         }
         

+ 26 - 5
src/Markup/Avalonia.Markup.Xaml.Loader/AvaloniaRuntimeXamlLoader.cs

@@ -3,7 +3,6 @@ using System.IO;
 using System.Reflection;
 using System.Text;
 using Avalonia.Markup.Xaml.XamlIl;
-// ReSharper disable CheckNamespace
 
 namespace Avalonia.Markup.Xaml
 {
@@ -13,10 +12,10 @@ namespace Avalonia.Markup.Xaml
         /// Loads XAML from a string.
         /// </summary>
         /// <param name="xaml">The string containing the XAML.</param>
-        /// <param name="localAssembly">Default assembly for clr-namespace:</param>
-        /// <param name="rootInstance">
-        /// The optional instance into which the XAML should be loaded.
-        /// </param>
+        /// <param name="localAssembly">Default assembly for clr-namespace:.</param>
+        /// <param name="rootInstance">The optional instance into which the XAML should be loaded.</param>
+        /// <param name="uri">The URI of the XAML being loaded.</param>
+        /// <param name="designMode">Indicates whether the XAML is being loaded in design mode.</param>
         /// <returns>The loaded object.</returns>
         public static object Load(string xaml, Assembly localAssembly = null, object rootInstance = null, Uri uri = null, bool designMode = false)
         {
@@ -28,13 +27,35 @@ namespace Avalonia.Markup.Xaml
             }
         }
 
+        /// <summary>
+        /// Loads XAML from a stream.
+        /// </summary>
+        /// <param name="stream">The stream containing the XAML.</param>
+        /// <param name="localAssembly">Default assembly for clr-namespace:</param>
+        /// <param name="rootInstance">The optional instance into which the XAML should be loaded.</param>
+        /// <param name="uri">The URI of the XAML being loaded.</param>
+        /// <param name="designMode">Indicates whether the XAML is being loaded in design mode.</param>
+        /// <returns>The loaded object.</returns>
         public static object Load(Stream stream, Assembly localAssembly, object rootInstance = null, Uri uri = null,
             bool designMode = false)
             => AvaloniaXamlIlRuntimeCompiler.Load(stream, localAssembly, rootInstance, uri, designMode);
 
+        /// <summary>
+        /// Parse XAML from a string.
+        /// </summary>
+        /// <param name="xaml">The string containing the XAML.</param>
+        /// <param name="localAssembly">Default assembly for clr-namespace:.</param>
+        /// <returns>The loaded object.</returns>
         public static object Parse(string xaml, Assembly localAssembly = null)
             => Load(xaml, localAssembly);
 
+        /// <summary>
+        /// Parse XAML from a string.
+        /// </summary>
+        /// <typeparam name="T">The type of the returned object.</typeparam>
+        /// <param name="xaml">>The string containing the XAML.</param>
+        /// <param name="localAssembly">>Default assembly for clr-namespace:.</param>
+        /// <returns>The loaded object.</returns>
         public static T Parse<T>(string xaml, Assembly localAssembly = null)
             => (T)Parse(xaml, localAssembly);
             

+ 1 - 1
src/Markup/Avalonia.Markup.Xaml/Properties/AssemblyInfo.cs

@@ -5,5 +5,5 @@ using System.Runtime.CompilerServices;
 [assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Markup.Xaml.MarkupExtensions")]
 [assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Markup.Xaml.Styling")]
 [assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Markup.Xaml.Templates")]
-[assembly: InternalsVisibleTo("Avalonia.Markup.Xaml.UnitTests")]
+[assembly: InternalsVisibleTo("Avalonia.Markup.Xaml.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1bba1142285fe0419326fb25866ba62c47e6c2b5c1ab0c95b46413fad375471232cb81706932e1cef38781b9ebd39d5100401bacb651c6c5bbf59e571e81b3bc08d2a622004e08b1a6ece82a7e0b9857525c86d2b95fab4bc3dce148558d7f3ae61aa3a234086902aeface87d9dfdd32b9d2fe3c6dd4055b5ab4b104998bd87")]
 

+ 1 - 1
src/Markup/Avalonia.Markup/Properties/AssemblyInfo.cs

@@ -4,4 +4,4 @@ using System.Runtime.CompilerServices;
 
 [assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Data")]
 [assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Markup.Data")]
-[assembly: InternalsVisibleTo("Avalonia.Markup.UnitTests")]
+[assembly: InternalsVisibleTo("Avalonia.Markup.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1bba1142285fe0419326fb25866ba62c47e6c2b5c1ab0c95b46413fad375471232cb81706932e1cef38781b9ebd39d5100401bacb651c6c5bbf59e571e81b3bc08d2a622004e08b1a6ece82a7e0b9857525c86d2b95fab4bc3dce148558d7f3ae61aa3a234086902aeface87d9dfdd32b9d2fe3c6dd4055b5ab4b104998bd87")]

+ 2 - 2
src/Skia/Avalonia.Skia/Properties/AssemblyInfo.cs

@@ -1,4 +1,4 @@
 using System.Runtime.CompilerServices;
 
-[assembly: InternalsVisibleTo("Avalonia.Skia.RenderTests")]
-[assembly: InternalsVisibleTo("Avalonia.Skia.UnitTests")]
+[assembly: InternalsVisibleTo("Avalonia.Skia.RenderTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1bba1142285fe0419326fb25866ba62c47e6c2b5c1ab0c95b46413fad375471232cb81706932e1cef38781b9ebd39d5100401bacb651c6c5bbf59e571e81b3bc08d2a622004e08b1a6ece82a7e0b9857525c86d2b95fab4bc3dce148558d7f3ae61aa3a234086902aeface87d9dfdd32b9d2fe3c6dd4055b5ab4b104998bd87")]
+[assembly: InternalsVisibleTo("Avalonia.Skia.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1bba1142285fe0419326fb25866ba62c47e6c2b5c1ab0c95b46413fad375471232cb81706932e1cef38781b9ebd39d5100401bacb651c6c5bbf59e571e81b3bc08d2a622004e08b1a6ece82a7e0b9857525c86d2b95fab4bc3dce148558d7f3ae61aa3a234086902aeface87d9dfdd32b9d2fe3c6dd4055b5ab4b104998bd87")]

+ 0 - 1
src/Windows/Avalonia.Direct2D1/Media/DrawingContextImpl.cs

@@ -323,7 +323,6 @@ namespace Avalonia.Direct2D1.Media
         /// </summary>
         /// <param name="foreground">The foreground.</param>
         /// <param name="glyphRun">The glyph run.</param>
-        /// <param name="baselineOrigin"></param>
         public void DrawGlyphRun(IBrush foreground, GlyphRun glyphRun)
         {
             using (var brush = CreateBrush(foreground, glyphRun.Size))

+ 2 - 2
src/Windows/Avalonia.Direct2D1/Properties/AssemblyInfo.cs

@@ -6,6 +6,6 @@ using Avalonia.Direct2D1;
 [assembly: ExportRenderingSubsystem(OperatingSystemType.WinNT, 1, "Direct2D1", typeof(Direct2D1Platform), nameof(Direct2D1Platform.Initialize),
     typeof(Direct2DChecker))]
 
-[assembly: InternalsVisibleTo("Avalonia.Direct2D1.RenderTests")]
-[assembly: InternalsVisibleTo("Avalonia.Direct2D1.UnitTests")]
+[assembly: InternalsVisibleTo("Avalonia.Direct2D1.RenderTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1bba1142285fe0419326fb25866ba62c47e6c2b5c1ab0c95b46413fad375471232cb81706932e1cef38781b9ebd39d5100401bacb651c6c5bbf59e571e81b3bc08d2a622004e08b1a6ece82a7e0b9857525c86d2b95fab4bc3dce148558d7f3ae61aa3a234086902aeface87d9dfdd32b9d2fe3c6dd4055b5ab4b104998bd87")]
+[assembly: InternalsVisibleTo("Avalonia.Direct2D1.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c1bba1142285fe0419326fb25866ba62c47e6c2b5c1ab0c95b46413fad375471232cb81706932e1cef38781b9ebd39d5100401bacb651c6c5bbf59e571e81b3bc08d2a622004e08b1a6ece82a7e0b9857525c86d2b95fab4bc3dce148558d7f3ae61aa3a234086902aeface87d9dfdd32b9d2fe3c6dd4055b5ab4b104998bd87")]
 

+ 1 - 1
src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj

@@ -2,7 +2,7 @@
   <PropertyGroup>
     <TargetFramework>net461</TargetFramework>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <ExtrasEnableWpfProjectSetup>true</ExtrasEnableWpfProjectSetup>
+    <UseWpf>true</UseWpf>
     <ExtrasEnableImplicitWinFormsReferences>true</ExtrasEnableImplicitWinFormsReferences>
     <UseDirect3D9>true</UseDirect3D9>
     <PackageId>Avalonia.Win32.Interoperability</PackageId>

+ 1 - 0
src/Windows/Avalonia.Win32/Interop/TaskBarList.cs

@@ -13,6 +13,7 @@ namespace Avalonia.Win32.Interop
         /// <summary>
         /// Ported from https://github.com/chromium/chromium/blob/master/ui/views/win/fullscreen_handler.cc
         /// </summary>
+        /// <param name="hwnd">The window handle.</param>
         /// <param name="fullscreen">Fullscreen state.</param>
         public static unsafe void MarkFullscreen(IntPtr hwnd, bool fullscreen)
         {

+ 4 - 4
tests/Avalonia.Animation.UnitTests/AnimatableTests.cs

@@ -113,7 +113,7 @@ namespace Avalonia.Animation.UnitTests
                 It.IsAny<IClock>(),
                 1.0,
                 0.5));
-            target.ResetCalls();
+            target.Invocations.Clear();
 
             control.SetValue(Visual.OpacityProperty, 0.8, BindingPriority.StyleTrigger);
 
@@ -135,7 +135,7 @@ namespace Avalonia.Animation.UnitTests
             target.Setup(x => x.Apply(control, It.IsAny<IClock>(), 1.0, 0.5)).Returns(sub.Object);
 
             control.Opacity = 0.5;
-            sub.ResetCalls();
+            sub.Invocations.Clear();
             control.Opacity = 0.4;
 
             sub.Verify(x => x.Dispose());
@@ -158,7 +158,7 @@ namespace Avalonia.Animation.UnitTests
             control.Opacity = 0.5;
 
             Assert.Equal(0.9, control.Opacity);
-            target.ResetCalls();
+            target.Invocations.Clear();
 
             control.Opacity = 0.4;
 
@@ -182,7 +182,7 @@ namespace Avalonia.Animation.UnitTests
                 It.IsAny<IClock>(),
                 1.0,
                 0.5));
-            target.ResetCalls();
+            target.Invocations.Clear();
 
             var root = (TestRoot)control.Parent;
             root.Child = null;

+ 2 - 2
tests/Avalonia.Base.UnitTests/AvaloniaObjectTests_Metadata.cs

@@ -67,7 +67,7 @@ namespace Avalonia.Base.UnitTests
             public static readonly DirectProperty<Class1, string> DirectProperty =
                 AvaloniaProperty.RegisterDirect<Class1, string>("Styled", o => o.Direct, unsetValue: "foo");
 
-            private string _direct;
+            private string _direct = default;
 
             public string Direct
             {
@@ -92,7 +92,7 @@ namespace Avalonia.Base.UnitTests
             public static readonly DirectProperty<Class3, string> DirectProperty =
                 Class1.DirectProperty.AddOwner<Class3>(o => o.Direct, unsetValue: "baz");
 
-            private string _direct;
+            private string _direct = default;
 
             static Class3()
             {

+ 4 - 0
tests/Avalonia.Base.UnitTests/Collections/AvaloniaListExtenionsTests.cs

@@ -6,10 +6,12 @@ namespace Avalonia.Base.UnitTests.Collections
 {
     public class AvaloniaListExtenionsTests
     {
+#pragma warning disable CS0618 // Type or member is obsolete
         [Fact]
         public void CreateDerivedList_Creates_Initial_Items()
         {
             var source = new AvaloniaList<int>(new[] { 0, 1, 2, 3 });
+
             var target = source.CreateDerivedList(x => new Wrapper(x));
             var result = target.Select(x => x.Value).ToList();
 
@@ -137,6 +139,8 @@ namespace Avalonia.Base.UnitTests.Collections
 
             Assert.Equal(source, result);
         }
+#pragma warning restore CS0618 // Type or member is obsolete
+
 
         private class Wrapper
         {

+ 1 - 1
tests/Avalonia.Base.UnitTests/Data/Core/BindingExpressionTests.cs

@@ -356,7 +356,7 @@ namespace Avalonia.Base.UnitTests.Data.Core
         }
 
         [Fact]
-        public async Task Null_Value_Should_Use_TargetNullValue()
+        public void Null_Value_Should_Use_TargetNullValue()
         {
             var data = new Class1 { StringValue = "foo" };
 

+ 9 - 5
tests/Avalonia.Base.UnitTests/Data/DefaultValueConverterTests.cs

@@ -1,12 +1,11 @@
+using System;
+using System.ComponentModel;
 using System.Globalization;
-using Avalonia.Controls;
-using Avalonia.Data;
-using Xunit;
 using System.Windows.Input;
-using System;
+using Avalonia.Data;
 using Avalonia.Data.Converters;
 using Avalonia.Layout;
-using System.ComponentModel;
+using Xunit;
 
 namespace Avalonia.Base.UnitTests.Data.Converters
 {
@@ -251,6 +250,11 @@ namespace Avalonia.Base.UnitTests.Data.Converters
             {
                 return obj is CustomType other && this.Value == other.Value;
             }
+
+            public override int GetHashCode()
+            {
+                return 8399587^Value.GetHashCode();
+            }
         }
 
         private class CustomTypeConverter : TypeConverter

+ 2 - 1
tests/Avalonia.Benchmarks/NullRenderer.cs

@@ -9,8 +9,9 @@ namespace Avalonia.Benchmarks
     {
         public bool DrawFps { get; set; }
         public bool DrawDirtyRects { get; set; }
+#pragma warning disable CS0067
         public event EventHandler<SceneInvalidatedEventArgs> SceneInvalidated;
-
+#pragma warning restore CS0067
         public void AddDirty(IVisual visual)
         {
         }

+ 3 - 0
tests/Avalonia.Benchmarks/NullThreadingPlatform.cs

@@ -23,6 +23,9 @@ namespace Avalonia.Benchmarks
 
         public bool CurrentThreadIsLoopThread => true;
 
+#pragma warning disable CS0067
         public event Action<DispatcherPriority?> Signaled;
+#pragma warning restore CS0067
+
     }
 }

+ 0 - 1
tests/Avalonia.Controls.UnitTests/Avalonia.Controls.UnitTests.csproj

@@ -22,7 +22,6 @@
     <ProjectReference Include="..\..\src\Avalonia.Input\Avalonia.Input.csproj" />
     <ProjectReference Include="..\..\src\Avalonia.Interactivity\Avalonia.Interactivity.csproj" />
     <ProjectReference Include="..\..\src\Avalonia.Layout\Avalonia.Layout.csproj" />
-    <ProjectReference Include="..\..\src\Avalonia.ReactiveUI\Avalonia.ReactiveUI.csproj" />
     <ProjectReference Include="..\..\src\Avalonia.Visuals\Avalonia.Visuals.csproj" />
     <ProjectReference Include="..\..\src\Avalonia.Styling\Avalonia.Styling.csproj" />
     <ProjectReference Include="..\Avalonia.UnitTests\Avalonia.UnitTests.csproj" />

+ 1 - 1
tests/Avalonia.Controls.UnitTests/BorderTests.cs

@@ -54,7 +54,7 @@ namespace Avalonia.Controls.UnitTests
 
             var root = new TestRoot(target);
             var renderer = Mock.Get(root.Renderer);
-            renderer.ResetCalls();
+            renderer.Invocations.Clear();
 
             ((SolidColorBrush)target.Background).Color = Colors.Green;
 

+ 1 - 1
tests/Avalonia.Controls.UnitTests/PanelTests.cs

@@ -127,7 +127,7 @@ namespace Avalonia.Controls.UnitTests
 
             var root = new TestRoot(target);
             var renderer = Mock.Get(root.Renderer);
-            renderer.ResetCalls();
+            renderer.Invocations.Clear();
 
             ((SolidColorBrush)target.Background).Color = Colors.Green;
 

+ 5 - 5
tests/Avalonia.Controls.UnitTests/Platform/DefaultMenuInteractionHandlerTests.cs

@@ -503,26 +503,26 @@ namespace Avalonia.Controls.UnitTests.Platform
                 target.PointerEnter(item, enter);
                 Assert.True(timer.ActionIsQueued);
                 Mock.Get(parentItem).VerifySet(x => x.SelectedItem = item);
-                Mock.Get(parentItem).ResetCalls();
+                Mock.Get(parentItem).Invocations.Clear();
 
                 // SubMenu shown after a delay.
                 timer.Pulse();
                 Mock.Get(item).Verify(x => x.Open());
                 Mock.Get(item).SetupGet(x => x.IsSubMenuOpen).Returns(true);
-                Mock.Get(item).ResetCalls();
+                Mock.Get(item).Invocations.Clear();
 
                 // Pointer briefly exits item, but submenu remains open.
                 target.PointerLeave(item, leave);
                 Mock.Get(item).Verify(x => x.Close(), Times.Never);
-                Mock.Get(item).ResetCalls();
+                Mock.Get(item).Invocations.Clear();
 
                 // Pointer enters child item; is selected.
                 enter.Source = childItem;
                 target.PointerEnter(childItem, enter);
                 Mock.Get(item).VerifySet(x => x.SelectedItem = childItem);
                 Mock.Get(parentItem).VerifySet(x => x.SelectedItem = item);
-                Mock.Get(item).ResetCalls();
-                Mock.Get(parentItem).ResetCalls();
+                Mock.Get(item).Invocations.Clear();
+                Mock.Get(parentItem).Invocations.Clear();
             }
 
             [Fact]

+ 1 - 1
tests/Avalonia.Controls.UnitTests/Presenters/ContentPresenterTests_Standalone.cs

@@ -212,7 +212,7 @@ namespace Avalonia.Controls.UnitTests.Presenters
 
             var root = new TestRoot(target);
             var renderer = Mock.Get(root.Renderer);
-            renderer.ResetCalls();
+            renderer.Invocations.Clear();
 
             ((SolidColorBrush)target.Background).Color = Colors.Green;
 

+ 2 - 2
tests/Avalonia.Controls.UnitTests/TextBlockTests.cs

@@ -37,7 +37,7 @@ namespace Avalonia.Controls.UnitTests
 
             var root = new TestRoot(target);
             var renderer = Mock.Get(root.Renderer);
-            renderer.ResetCalls();
+            renderer.Invocations.Clear();
 
             ((SolidColorBrush)target.Background).Color = Colors.Green;
 
@@ -54,7 +54,7 @@ namespace Avalonia.Controls.UnitTests
 
             var root = new TestRoot(target);
             var renderer = Mock.Get(root.Renderer);
-            renderer.ResetCalls();
+            renderer.Invocations.Clear();
 
             ((SolidColorBrush)target.Foreground).Color = Colors.Green;
 

+ 15 - 5
tests/Avalonia.Controls.UnitTests/TreeViewTests.cs

@@ -2,7 +2,9 @@ using System;
 using System.Collections;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
+using System.ComponentModel;
 using System.Linq;
+using System.Runtime.CompilerServices;
 using Avalonia.Collections;
 using Avalonia.Controls.Presenters;
 using Avalonia.Controls.Templates;
@@ -14,7 +16,7 @@ using Avalonia.Interactivity;
 using Avalonia.LogicalTree;
 using Avalonia.Styling;
 using Avalonia.UnitTests;
-using ReactiveUI;
+using JetBrains.Annotations;
 using Xunit;
 
 namespace Avalonia.Controls.UnitTests
@@ -480,8 +482,12 @@ namespace Avalonia.Controls.UnitTests
 
                 var selectedValues = new List<object>();
 
-                dataContext.WhenAnyValue(x => x.SelectedItem)
-                    .Subscribe(x => selectedValues.Add(x));
+                dataContext.PropertyChanged += (_, e) =>
+                {
+                    if (e.PropertyName == nameof(TestDataContext.SelectedItem))
+                        selectedValues.Add(dataContext.SelectedItem);
+                };
+                selectedValues.Add(dataContext.SelectedItem);
 
                 _mouse.Click((Interactive)target.Presenter.Panel.Children[0], MouseButton.Left);
                 _mouse.Click((Interactive)target.Presenter.Panel.Children[2], MouseButton.Left);
@@ -1326,7 +1332,7 @@ namespace Avalonia.Controls.UnitTests
         {
         }
 
-        private class TestDataContext : ReactiveObject
+        private class TestDataContext : INotifyPropertyChanged
         {
             private string _selectedItem;
 
@@ -1342,9 +1348,13 @@ namespace Avalonia.Controls.UnitTests
                 get { return _selectedItem; }
                 set
                 {
-                    this.RaiseAndSetIfChanged(ref _selectedItem, value);
+                    _selectedItem = value;
+                    PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(SelectedItem)));
                 }
             }
+
+            public event PropertyChangedEventHandler PropertyChanged;
+            
         }
     }
 }

+ 8 - 5
tests/Avalonia.DesignerSupport.TestApp/App.xaml.cs

@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using Avalonia.Controls.ApplicationLifetimes;
 using Avalonia.Markup.Xaml;
 
 namespace Avalonia.DesignerSupport.TestApp
@@ -13,5 +9,12 @@ namespace Avalonia.DesignerSupport.TestApp
         {
             AvaloniaXamlLoader.Load(this);
         }
+
+        public override void OnFrameworkInitializationCompleted()
+        {
+            if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
+                desktop.MainWindow = new MainWindow();
+            base.OnFrameworkInitializationCompleted();
+        }
     }
 }

+ 5 - 15
tests/Avalonia.DesignerSupport.TestApp/Program.cs

@@ -1,24 +1,14 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using Avalonia.Controls;
-
-namespace Avalonia.DesignerSupport.TestApp
+namespace Avalonia.DesignerSupport.TestApp
 {
     static class Program
     {
         /// <summary>
         /// The main entry point for the application.
         /// </summary>
-        static void Main()
-        {
-            BuildAvaloniaApp().Start<MainWindow>();
-        }
+        public static int Main(string[] args)
+            => BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
 
-        private static AppBuilder BuildAvaloniaApp()
-        {
-            return AppBuilder.Configure<App>().UsePlatformDetect();
-        }
+        public static AppBuilder BuildAvaloniaApp()
+          => AppBuilder.Configure<App>().UsePlatformDetect();
     }
 }

+ 3 - 3
tests/Avalonia.Layout.UnitTests/LayoutableTests.cs

@@ -112,7 +112,7 @@ namespace Avalonia.Layout.UnitTests
 
             root.Measure(Size.Infinity);
             root.Arrange(new Rect(root.DesiredSize));
-            target.ResetCalls();
+            target.Invocations.Clear();
 
             control.InvalidateMeasure();
             control.InvalidateMeasure();
@@ -133,7 +133,7 @@ namespace Avalonia.Layout.UnitTests
 
             root.Measure(Size.Infinity);
             root.Arrange(new Rect(root.DesiredSize));
-            target.ResetCalls();
+            target.Invocations.Clear();
 
             control.InvalidateArrange();
             control.InvalidateArrange();
@@ -163,7 +163,7 @@ namespace Avalonia.Layout.UnitTests
             Assert.False(control.IsMeasureValid);
             Assert.True(root.IsMeasureValid);
 
-            target.ResetCalls();
+            target.Invocations.Clear();
 
             root.Child = control;
 

+ 2 - 0
tests/Avalonia.Layout.UnitTests/LayoutableTests_EffectiveViewportChanged.cs

@@ -15,7 +15,9 @@ namespace Avalonia.Layout.UnitTests
         [Fact]
         public async Task EffectiveViewportChanged_Not_Raised_When_Control_Added_To_Tree()
         {
+#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
             await RunOnUIThread.Execute(async () =>
+#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
             {
                 var root = CreateRoot();
                 var target = new Canvas();

+ 4 - 3
tests/Avalonia.LeakTests/ControlTests.cs

@@ -460,7 +460,7 @@ namespace Avalonia.LeakTests
                 
                 AttachShowAndDetachContextMenu(window);
 
-                Mock.Get(window.PlatformImpl).ResetCalls();
+                Mock.Get(window.PlatformImpl).Invocations.Clear();
                 dotMemory.Check(memory =>
                     Assert.Equal(initialMenuCount, memory.GetObjects(where => where.Type.Is<ContextMenu>()).ObjectsCount));
                 dotMemory.Check(memory =>
@@ -505,7 +505,7 @@ namespace Avalonia.LeakTests
                 BuildAndShowContextMenu(window);
                 BuildAndShowContextMenu(window);
 
-                Mock.Get(window.PlatformImpl).ResetCalls();
+                Mock.Get(window.PlatformImpl).Invocations.Clear();
                 dotMemory.Check(memory =>
                     Assert.Equal(initialMenuCount, memory.GetObjects(where => where.Type.Is<ContextMenu>()).ObjectsCount));
                 dotMemory.Check(memory =>
@@ -601,8 +601,9 @@ namespace Avalonia.LeakTests
         {
             public bool DrawFps { get; set; }
             public bool DrawDirtyRects { get; set; }
+#pragma warning disable CS0067
             public event EventHandler<SceneInvalidatedEventArgs> SceneInvalidated;
-
+#pragma warning restore CS0067
             public void AddDirty(IVisual visual)
             {
             }

+ 14 - 1
tests/Avalonia.Markup.UnitTests/Parsers/ExpressionObserverBuilderTests_Negation.cs

@@ -168,10 +168,23 @@ namespace Avalonia.Markup.UnitTests.Parsers
 
         private class Test : INotifyDataErrorInfo
         {
+            private string _dataValidationError;
+
             public bool Foo { get; set; }
             public object Bar { get; set; }
 
-            public string DataValidationError { get; set; }
+            public string DataValidationError
+            {
+                get => _dataValidationError;
+                set
+                {
+                    if (value == _dataValidationError)
+                        return;
+                    _dataValidationError = value;
+                    ErrorsChanged?
+                        .Invoke(this, new DataErrorsChangedEventArgs(nameof(DataValidationError)));
+                }
+            }
             public bool HasErrors => !string.IsNullOrWhiteSpace(DataValidationError);
 
             public event EventHandler<DataErrorsChangedEventArgs> ErrorsChanged;

+ 2 - 0
tests/Avalonia.RenderTests/Media/BitmapTests.cs

@@ -102,7 +102,9 @@ namespace Avalonia.Direct2D1.RenderTests.Media
         [InlineData(PixelFormat.Bgra8888), InlineData(PixelFormat.Rgba8888)]
         public void WriteableBitmapShouldBeUsable(PixelFormat fmt)
         {
+#pragma warning disable CS0618 // Type or member is obsolete
             var writeableBitmap = new WriteableBitmap(new PixelSize(256, 256), new Vector(96, 96), fmt);
+#pragma warning restore CS0618 // Type or member is obsolete
 
             var data = new int[256 * 256];
             for (int y = 0; y < 256; y++)

+ 6 - 6
tests/Avalonia.Styling.UnitTests/ResourceDictionaryTests.cs

@@ -108,7 +108,7 @@ namespace Avalonia.Styling.UnitTests
             var target = new ResourceDictionary { { "foo", "bar" } };
 
             ((IResourceProvider)target).AddOwner(host.Object);
-            host.ResetCalls();
+            host.Invocations.Clear();
             ((IResourceProvider)target).RemoveOwner(host.Object);
 
             host.Verify(x => x.NotifyHostedResourcesChanged(It.IsAny<ResourcesChangedEventArgs>()));
@@ -120,7 +120,7 @@ namespace Avalonia.Styling.UnitTests
             var host = new Mock<IResourceHost>();
             var target = new ResourceDictionary(host.Object);
 
-            host.ResetCalls();
+            host.Invocations.Clear();
             target.Add("foo", "bar");
 
             host.Verify(x => x.NotifyHostedResourcesChanged(It.IsAny<ResourcesChangedEventArgs>()));
@@ -132,7 +132,7 @@ namespace Avalonia.Styling.UnitTests
             var host = new Mock<IResourceHost>();
             var target = new ResourceDictionary(host.Object);
 
-            host.ResetCalls();
+            host.Invocations.Clear();
             target.MergedDictionaries.Add(new ResourceDictionary
             {
                 { "foo", "bar" },
@@ -149,7 +149,7 @@ namespace Avalonia.Styling.UnitTests
             var host = new Mock<IResourceHost>();
             var target = new ResourceDictionary(host.Object);
 
-            host.ResetCalls();
+            host.Invocations.Clear();
             target.MergedDictionaries.Add(new ResourceDictionary());
 
             host.Verify(
@@ -169,7 +169,7 @@ namespace Avalonia.Styling.UnitTests
                 }
             };
 
-            host.ResetCalls();
+            host.Invocations.Clear();
             target.MergedDictionaries.RemoveAt(0);
 
             host.Verify(
@@ -189,7 +189,7 @@ namespace Avalonia.Styling.UnitTests
                 }
             };
 
-            host.ResetCalls();
+            host.Invocations.Clear();
             ((IResourceDictionary)target.MergedDictionaries[0]).Add("foo", "bar");
 
             host.Verify(

+ 0 - 75
tests/Avalonia.Styling.UnitTests/SelectorTests_Child.cs

@@ -1,12 +1,7 @@
-using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Reactive;
 using System.Reactive.Linq;
 using System.Threading.Tasks;
-using Avalonia.Collections;
 using Avalonia.Controls;
-using Avalonia.Data;
 using Avalonia.LogicalTree;
 using Xunit;
 
@@ -85,76 +80,6 @@ namespace Avalonia.Styling.UnitTests
                 get => Parent;
                 set => ((ISetLogicalParent)this).SetParent(value);
             }
-
-            public void ClearValue(AvaloniaProperty property)
-            {
-                throw new NotImplementedException();
-            }
-
-            public void ClearValue<T>(AvaloniaProperty<T> property)
-            {
-                throw new NotImplementedException();
-            }
-
-            public void AddInheritanceChild(IAvaloniaObject child)
-            {
-                throw new NotImplementedException();
-            }
-
-            public void RemoveInheritanceChild(IAvaloniaObject child)
-            {
-                throw new NotImplementedException();
-            }
-
-            public void InheritanceParentChanged<T>(StyledPropertyBase<T> property, IAvaloniaObject oldParent, IAvaloniaObject newParent)
-            {
-                throw new NotImplementedException();
-            }
-
-            public void InheritedPropertyChanged<T>(AvaloniaProperty<T> property, Optional<T> oldValue, Optional<T> newValue)
-            {
-                throw new NotImplementedException();
-            }
-
-            public void ClearValue<T>(StyledPropertyBase<T> property)
-            {
-                throw new NotImplementedException();
-            }
-
-            public void ClearValue<T>(DirectPropertyBase<T> property)
-            {
-                throw new NotImplementedException();
-            }
-
-            public T GetValue<T>(StyledPropertyBase<T> property)
-            {
-                throw new NotImplementedException();
-            }
-
-            public T GetValue<T>(DirectPropertyBase<T> property)
-            {
-                throw new NotImplementedException();
-            }
-
-            public void SetValue<T>(StyledPropertyBase<T> property, T value, BindingPriority priority = BindingPriority.LocalValue)
-            {
-                throw new NotImplementedException();
-            }
-
-            public void SetValue<T>(DirectPropertyBase<T> property, T value)
-            {
-                throw new NotImplementedException();
-            }
-
-            public IDisposable Bind<T>(StyledPropertyBase<T> property, IObservable<BindingValue<T>> source, BindingPriority priority = BindingPriority.LocalValue)
-            {
-                throw new NotImplementedException();
-            }
-
-            public IDisposable Bind<T>(DirectPropertyBase<T> property, IObservable<BindingValue<T>> source)
-            {
-                throw new NotImplementedException();
-            }
         }
 
         public class TestLogical1 : TestLogical

+ 0 - 74
tests/Avalonia.Styling.UnitTests/SelectorTests_Descendent.cs

@@ -1,11 +1,7 @@
-using System;
 using System.Linq;
-using System.Reactive;
 using System.Reactive.Linq;
 using System.Threading.Tasks;
-using Avalonia.Collections;
 using Avalonia.Controls;
-using Avalonia.Data;
 using Avalonia.LogicalTree;
 using Xunit;
 
@@ -115,76 +111,6 @@ namespace Avalonia.Styling.UnitTests
                 get => Parent;
                 set => ((ISetLogicalParent)this).SetParent(value);
             }
-
-            public void ClearValue(AvaloniaProperty property)
-            {
-                throw new NotImplementedException();
-            }
-
-            public void ClearValue<T>(AvaloniaProperty<T> property)
-            {
-                throw new NotImplementedException();
-            }
-
-            public void AddInheritanceChild(IAvaloniaObject child)
-            {
-                throw new NotImplementedException();
-            }
-
-            public void RemoveInheritanceChild(IAvaloniaObject child)
-            {
-                throw new NotImplementedException();
-            }
-
-            public void InheritanceParentChanged<T>(StyledPropertyBase<T> property, IAvaloniaObject oldParent, IAvaloniaObject newParent)
-            {
-                throw new NotImplementedException();
-            }
-
-            public void InheritedPropertyChanged<T>(AvaloniaProperty<T> property, Optional<T> oldValue, Optional<T> newValue)
-            {
-                throw new NotImplementedException();
-            }
-
-            public void ClearValue<T>(StyledPropertyBase<T> property)
-            {
-                throw new NotImplementedException();
-            }
-
-            public void ClearValue<T>(DirectPropertyBase<T> property)
-            {
-                throw new NotImplementedException();
-            }
-
-            public T GetValue<T>(StyledPropertyBase<T> property)
-            {
-                throw new NotImplementedException();
-            }
-
-            public T GetValue<T>(DirectPropertyBase<T> property)
-            {
-                throw new NotImplementedException();
-            }
-
-            public void SetValue<T>(StyledPropertyBase<T> property, T value, BindingPriority priority = BindingPriority.LocalValue)
-            {
-                throw new NotImplementedException();
-            }
-
-            public void SetValue<T>(DirectPropertyBase<T> property, T value)
-            {
-                throw new NotImplementedException();
-            }
-
-            public IDisposable Bind<T>(StyledPropertyBase<T> property, IObservable<BindingValue<T>> source, BindingPriority priority = BindingPriority.LocalValue)
-            {
-                throw new NotImplementedException();
-            }
-
-            public IDisposable Bind<T>(DirectPropertyBase<T> property, IObservable<BindingValue<T>> source)
-            {
-                throw new NotImplementedException();
-            }
         }
 
         public class TestLogical1 : TestLogical

+ 1 - 1
tests/Avalonia.Styling.UnitTests/StyleTests.cs

@@ -443,7 +443,7 @@ namespace Avalonia.Styling.UnitTests
             var resources = new Mock<IResourceDictionary>();
             target.Resources = resources.Object;
 
-            host.ResetCalls();
+            host.Invocations.Clear();
             ((IResourceProvider)target).AddOwner(host.Object);
             resources.Verify(x => x.AddOwner(host.Object), Times.Once);
         }

+ 4 - 4
tests/Avalonia.Styling.UnitTests/StylesTests.cs

@@ -15,7 +15,7 @@ namespace Avalonia.Styling.UnitTests
             var style = new Mock<IStyle>();
             var rp = style.As<IResourceProvider>();
 
-            host.ResetCalls();
+            host.Invocations.Clear();
             target.Add(style.Object);
 
             rp.Verify(x => x.AddOwner(host.Object));
@@ -29,7 +29,7 @@ namespace Avalonia.Styling.UnitTests
             var style = new Mock<IStyle>();
             var rp = style.As<IResourceProvider>();
 
-            host.ResetCalls();
+            host.Invocations.Clear();
             target.Add(style.Object);
             target.Remove(style.Object);
 
@@ -58,7 +58,7 @@ namespace Avalonia.Styling.UnitTests
             var resources = new Mock<IResourceDictionary>();
             target.Resources = resources.Object;
 
-            host.ResetCalls();
+            host.Invocations.Clear();
             ((IResourceProvider)target).AddOwner(host.Object);
             resources.Verify(x => x.AddOwner(host.Object), Times.Once);
         }
@@ -87,7 +87,7 @@ namespace Avalonia.Styling.UnitTests
             var resourceProvider = style.As<IResourceProvider>();
             target.Add(style.Object);
 
-            host.ResetCalls();
+            host.Invocations.Clear();
             ((IResourceProvider)target).AddOwner(host.Object);
             resourceProvider.Verify(x => x.AddOwner(host.Object), Times.Once);
         }

+ 2 - 0
tests/Avalonia.UnitTests/Avalonia.UnitTests.csproj

@@ -6,6 +6,8 @@
     <OutputType>Library</OutputType>
     <IsPackable>false</IsPackable>
     <LangVersion>latest</LangVersion>
+    <AssemblyOriginatorKeyFile>..\..\build\avalonia.snk</AssemblyOriginatorKeyFile>
+    <SignAssembly>True</SignAssembly>
   </PropertyGroup>
   <ItemGroup>
     <EmbeddedResource Include="..\Avalonia.UnitTests\Assets\*.ttf" />

+ 1 - 1
tests/Avalonia.Visuals.UnitTests/Rendering/DeferredRendererTests.cs

@@ -756,7 +756,7 @@ namespace Avalonia.Visuals.UnitTests.Rendering
         private void IgnoreFirstFrame(IRenderLoopTask task, Mock<ISceneBuilder> sceneBuilder)
         {
             RunFrame(task);
-            sceneBuilder.ResetCalls();
+            sceneBuilder.Invocations.Clear();
         }
 
         private void RunFrame(IRenderLoopTask task)

+ 1 - 1
tests/Avalonia.Visuals.UnitTests/VisualTests.cs

@@ -173,7 +173,7 @@ namespace Avalonia.Visuals.UnitTests
             };
 
             root.Child = child;
-            renderer.ResetCalls();
+            renderer.Invocations.Clear();
             root.Child = null;
 
             renderer.Verify(x => x.AddDirty(child));