diff --git a/build/UnitTests.NetCore.targets b/build/UnitTests.NetCore.targets
index 13bb4ed230..42da8e4ab1 100644
--- a/build/UnitTests.NetCore.targets
+++ b/build/UnitTests.NetCore.targets
@@ -3,25 +3,6 @@
false
true
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
- MinimumRecommendedRules.ruleset
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
- MinimumRecommendedRules.ruleset
-
diff --git a/src/Avalonia.HtmlRenderer/Avalonia.HtmlRenderer.csproj b/src/Avalonia.HtmlRenderer/Avalonia.HtmlRenderer.csproj
index f715217e42..e7822324a9 100644
--- a/src/Avalonia.HtmlRenderer/Avalonia.HtmlRenderer.csproj
+++ b/src/Avalonia.HtmlRenderer/Avalonia.HtmlRenderer.csproj
@@ -4,6 +4,7 @@
False
False
false
+ CS0436
true
diff --git a/src/Linux/Avalonia.LinuxFramebuffer/NativeUnsafeMethods.cs b/src/Linux/Avalonia.LinuxFramebuffer/NativeUnsafeMethods.cs
index ad8def369d..fbbf036b74 100644
--- a/src/Linux/Avalonia.LinuxFramebuffer/NativeUnsafeMethods.cs
+++ b/src/Linux/Avalonia.LinuxFramebuffer/NativeUnsafeMethods.cs
@@ -72,6 +72,7 @@ namespace Avalonia.LinuxFramebuffer
FB_VBLANK_HAVE_VSYNC = 0x100 /* verical syncs can be detected */
}
+ [StructLayout(LayoutKind.Sequential)]
unsafe struct fb_vblank {
public VBlankFlags flags; /* FB_VBLANK flags */
__u32 count; /* counter of retraces since boot */
diff --git a/src/Windows/Avalonia.Designer/AppHost/HostedAppModel.cs b/src/Windows/Avalonia.Designer/AppHost/HostedAppModel.cs
index a64304619a..b5d0687baa 100644
--- a/src/Windows/Avalonia.Designer/AppHost/HostedAppModel.cs
+++ b/src/Windows/Avalonia.Designer/AppHost/HostedAppModel.cs
@@ -86,7 +86,6 @@ namespace Avalonia.Designer.AppHost
}
double _currentScalingFactor = 1;
- private string _color;
private string _background;
public event PropertyChangedEventHandler PropertyChanged;
diff --git a/src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs b/src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs
index d5a6f1a7a1..5473ef9bea 100644
--- a/src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs
+++ b/src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs
@@ -922,9 +922,7 @@ namespace Avalonia.Win32.Interop
[StructLayout(LayoutKind.Sequential)]
internal class MONITORINFO
{
-#pragma warning disable CS0618 // Type or member is obsolete
- public int cbSize = Marshal.SizeOf(typeof(MONITORINFO));
-#pragma warning restore CS0618 // Type or member is obsolete
+ public int cbSize = Marshal.SizeOf();
public RECT rcMonitor = new RECT();
public RECT rcWork = new RECT();
public int dwFlags = 0;
diff --git a/src/Windows/Avalonia.Win32/Win32Platform.cs b/src/Windows/Avalonia.Win32/Win32Platform.cs
index 584a5ba39e..d8e9256156 100644
--- a/src/Windows/Avalonia.Win32/Win32Platform.cs
+++ b/src/Windows/Avalonia.Win32/Win32Platform.cs
@@ -167,7 +167,7 @@ namespace Avalonia.Win32
UnmanagedMethods.WNDCLASSEX wndClassEx = new UnmanagedMethods.WNDCLASSEX
{
- cbSize = Marshal.SizeOf(typeof(UnmanagedMethods.WNDCLASSEX)),
+ cbSize = Marshal.SizeOf(),
lpfnWndProc = _wndProcDelegate,
hInstance = UnmanagedMethods.GetModuleHandle(null),
lpszClassName = "AvaloniaMessageWindow " + Guid.NewGuid(),
diff --git a/src/Windows/Avalonia.Win32/WindowImpl.cs b/src/Windows/Avalonia.Win32/WindowImpl.cs
index feb7bdc2ee..4a30d48878 100644
--- a/src/Windows/Avalonia.Win32/WindowImpl.cs
+++ b/src/Windows/Avalonia.Win32/WindowImpl.cs
@@ -426,7 +426,7 @@ namespace Avalonia.Win32
case UnmanagedMethods.WindowsMessage.WM_DPICHANGED:
var dpi = ToInt32(wParam) & 0xffff;
- var newDisplayRect = (UnmanagedMethods.RECT)Marshal.PtrToStructure(lParam, typeof(UnmanagedMethods.RECT));
+ var newDisplayRect = Marshal.PtrToStructure(lParam);
Position = new Point(newDisplayRect.left, newDisplayRect.top);
_scaling = dpi / 96.0;
ScalingChanged?.Invoke(_scaling);
@@ -494,7 +494,7 @@ namespace Avalonia.Win32
{
var tm = new UnmanagedMethods.TRACKMOUSEEVENT
{
- cbSize = Marshal.SizeOf(typeof(UnmanagedMethods.TRACKMOUSEEVENT)),
+ cbSize = Marshal.SizeOf(),
dwFlags = 2,
hwndTrack = _hwnd,
dwHoverTime = 0,
@@ -619,7 +619,7 @@ namespace Avalonia.Win32
UnmanagedMethods.WNDCLASSEX wndClassEx = new UnmanagedMethods.WNDCLASSEX
{
- cbSize = Marshal.SizeOf(typeof(UnmanagedMethods.WNDCLASSEX)),
+ cbSize = Marshal.SizeOf(),
style = 0,
lpfnWndProc = _wndProcDelegate,
hInstance = UnmanagedMethods.GetModuleHandle(null),
diff --git a/tests/Avalonia.Input.UnitTests/Avalonia.Input.UnitTests.csproj b/tests/Avalonia.Input.UnitTests/Avalonia.Input.UnitTests.csproj
index 186d293b96..710a818bcd 100644
--- a/tests/Avalonia.Input.UnitTests/Avalonia.Input.UnitTests.csproj
+++ b/tests/Avalonia.Input.UnitTests/Avalonia.Input.UnitTests.csproj
@@ -3,35 +3,6 @@
net461;netcoreapp1.1
Library
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
- bin\Debug\Avalonia.Input.UnitTests.XML
- CS1591
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
@@ -48,7 +19,4 @@
-
-
-
\ No newline at end of file
diff --git a/tests/Avalonia.Styling.UnitTests/Avalonia.Styling.UnitTests.csproj b/tests/Avalonia.Styling.UnitTests/Avalonia.Styling.UnitTests.csproj
index 8dd8faf9db..3f9213b91f 100644
--- a/tests/Avalonia.Styling.UnitTests/Avalonia.Styling.UnitTests.csproj
+++ b/tests/Avalonia.Styling.UnitTests/Avalonia.Styling.UnitTests.csproj
@@ -2,6 +2,7 @@
net461;netcoreapp1.1
Library
+ CS0067