From 1bfbb956c211bcd33d3b6296cf620b5a268a8424 Mon Sep 17 00:00:00 2001 From: Dimitrij Date: Wed, 8 Mar 2023 20:23:38 +0000 Subject: [PATCH] fix CA1416: Validate platform compatibility https://learn.microsoft.com/en-gb/dotnet/fundamentals/code-analysis/quality-rules/ca1416 --- mRemoteNG.sln | 3 +- mRemoteNG/App/CompatibilityChecker.cs | 2 + .../App/Initialization/StartupDataLogger.cs | 2 + mRemoteNG/App/Runtime.cs | 2 + .../Multiuser/SqlConnectionsUpdateChecker.cs | 2 + .../Putty/PuttySessionsRegistryProvider.cs | 2 + .../ActiveDirectoryDeserializer.cs | 2 + ...oteDesktopConnectionManagerDeserializer.cs | 4 +- mRemoteNG/Connection/ConnectionIcon.cs | 4 +- mRemoteNG/Connection/ConnectionInitiator.cs | 3 +- mRemoteNG/Connection/ConnectionsService.cs | 4 +- mRemoteNG/Connection/Protocol/ProtocolBase.cs | 2 + mRemoteNG/Connection/Protocol/PuttyBase.cs | 2 + .../Connection/Protocol/RDP/RdpProtocol6.cs | 2 + .../Connection/Protocol/RDP/RdpProtocol8.cs | 254 +++++++++--------- .../Credential/PlaceholderCredentialRecord.cs | 2 + mRemoteNG/Properties/AssemblyInfo.cs | 6 +- mRemoteNG/Properties/rbac.Designer.cs | 6 +- mRemoteNG/Resources/ImageConverter.cs | 2 + mRemoteNG/Tools/ADhelper.cs | 2 + mRemoteNG/Tools/ExternalTool.cs | 2 + mRemoteNG/Tools/IeBrowserEmulation.cs | 2 + mRemoteNG/Tools/MiscTools.cs | 2 + mRemoteNG/Tools/NotificationAreaIcon.cs | 2 + mRemoteNG/Tools/WindowMenu.cs | 2 + .../Tools/WindowsRegistry/WindowsRegistry.cs | 2 + .../UI/Controls/ConnectionContextMenu.cs | 2 + .../Controls/ConnectionTree/ConnectionTree.cs | 2 + mRemoteNG/UI/Controls/HeadlessTabControl.cs | 2 + .../Controls/PageSequence/SequencedControl.cs | 2 + mRemoteNG/UI/Controls/QuickConnectComboBox.cs | 2 + mRemoteNG/UI/Controls/mrngButton.cs | 2 + mRemoteNG/UI/Controls/mrngCheckBox.cs | 2 + mRemoteNG/UI/Controls/mrngComboBox.cs | 2 + mRemoteNG/UI/Controls/mrngGroupBox.cs | 2 + mRemoteNG/UI/Controls/mrngIpTextBox.cs | 2 + mRemoteNG/UI/Controls/mrngLabel.cs | 2 + mRemoteNG/UI/Controls/mrngListView.cs | 2 + mRemoteNG/UI/Controls/mrngNumericUpDown.cs | 2 + mRemoteNG/UI/Controls/mrngProgressBar.cs | 2 + mRemoteNG/UI/Controls/mrngRadioButton.cs | 2 + mRemoteNG/UI/Controls/mrngTextBox.cs | 2 + mRemoteNG/UI/DisplayProperties.cs | 2 + mRemoteNG/UI/FontOverrider.cs | 2 + .../UI/Forms/OptionsPages/OptionsPage.cs | 2 + mRemoteNG/UI/Forms/frmMain.cs | 2 + .../GdiPlusGraphicsProvider.cs | 2 + mRemoteNG/UI/Menu/msMain/ViewMenu.cs | 2 + mRemoteNG/UI/StatusImageList.cs | 2 + mRemoteNG/UI/Tabs/DockPaneStripNG.cs | 2 + mRemoteNG/UI/Tabs/MremoteNGAutoHideStrip.cs | 2 + mRemoteNG/UI/TaskDialog/CommandButton.cs | 2 + mRemoteNG/UI/TaskDialog/frmTaskDialog.cs | 2 + mRemoteNG/UI/Window/BaseWindow.cs | 4 +- mRemoteNG/UI/Window/ConfigWindow.cs | 2 + mRemoteNG/UI/Window/ConnectionWindow.cs | 2 + mRemoteNG/UI/Window/SSHTransferWindow.cs | 2 + mRemoteNG/UI/Window/UltraVNCWindow.cs | 2 + mRemoteNG/mRemoteNG.csproj | 1 + .../Installer/Fragments/FilesFragment.wxs | 3 - 60 files changed, 248 insertions(+), 142 deletions(-) diff --git a/mRemoteNG.sln b/mRemoteNG.sln index 223813380..5d35dc348 100644 --- a/mRemoteNG.sln +++ b/mRemoteNG.sln @@ -39,7 +39,6 @@ Global {4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug|x64.ActiveCfg = Debug|x64 {4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug|x64.Build.0 = Debug|x64 {4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Installer|x64.ActiveCfg = Release|x64 - {4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Installer|x64.Build.0 = Release|x64 {4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Portable|x64.ActiveCfg = Release Portable|x64 {4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Portable|x64.Build.0 = Release Portable|x64 {4934A491-40BC-4E5B-9166-EA1169A220F6}.Release|x64.ActiveCfg = Release|x64 @@ -68,6 +67,7 @@ Global {F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release Installer|x64.Build.0 = Release|x64 {F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release Portable|x64.ActiveCfg = Release Portable|x64 {F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release|x64.ActiveCfg = Release|x64 + {F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release|x64.Build.0 = Release|x64 {16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Installer|x64.ActiveCfg = Debug|x64 {16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Portable|x64.ActiveCfg = Debug Portable|x64 {16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug|x64.ActiveCfg = Debug|x64 @@ -81,7 +81,6 @@ Global {A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Debug|x64.ActiveCfg = Debug|x64 {A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Debug|x64.Build.0 = Debug|x64 {A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release Installer|x64.ActiveCfg = Release|x64 - {A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release Installer|x64.Build.0 = Release|x64 {A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release Portable|x64.ActiveCfg = Release Portable|x64 {A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release Portable|x64.Build.0 = Release Portable|x64 {A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release|x64.ActiveCfg = Release|x64 diff --git a/mRemoteNG/App/CompatibilityChecker.cs b/mRemoteNG/App/CompatibilityChecker.cs index dff841c29..0ef443c91 100644 --- a/mRemoteNG/App/CompatibilityChecker.cs +++ b/mRemoteNG/App/CompatibilityChecker.cs @@ -8,9 +8,11 @@ using mRemoteNG.Properties; using mRemoteNG.UI.Forms; using mRemoteNG.UI.TaskDialog; using mRemoteNG.Resources.Language; +using System.Runtime.Versioning; namespace mRemoteNG.App { + [SupportedOSPlatform("windows")] public static class CompatibilityChecker { public static void CheckCompatibility(MessageCollector messageCollector) diff --git a/mRemoteNG/App/Initialization/StartupDataLogger.cs b/mRemoteNG/App/Initialization/StartupDataLogger.cs index eab7a3c78..58efbf8be 100644 --- a/mRemoteNG/App/Initialization/StartupDataLogger.cs +++ b/mRemoteNG/App/Initialization/StartupDataLogger.cs @@ -1,5 +1,6 @@ using System; using System.Management; +using System.Runtime.Versioning; using System.Threading; using System.Windows.Forms; using mRemoteNG.Messages; @@ -7,6 +8,7 @@ using mRemoteNG.Resources.Language; namespace mRemoteNG.App.Initialization { + [SupportedOSPlatform("windows")] public class StartupDataLogger { private readonly MessageCollector _messageCollector; diff --git a/mRemoteNG/App/Runtime.cs b/mRemoteNG/App/Runtime.cs index 278f37cee..1b4528bf1 100644 --- a/mRemoteNG/App/Runtime.cs +++ b/mRemoteNG/App/Runtime.cs @@ -17,9 +17,11 @@ using System.Threading; using System.Windows.Forms; using mRemoteNG.Properties; using mRemoteNG.Resources.Language; +using System.Runtime.Versioning; namespace mRemoteNG.App { + [SupportedOSPlatform("windows")] public static class Runtime { public static bool IsPortableEdition diff --git a/mRemoteNG/Config/Connections/Multiuser/SqlConnectionsUpdateChecker.cs b/mRemoteNG/Config/Connections/Multiuser/SqlConnectionsUpdateChecker.cs index 5ae462a4f..2610cf227 100644 --- a/mRemoteNG/Config/Connections/Multiuser/SqlConnectionsUpdateChecker.cs +++ b/mRemoteNG/Config/Connections/Multiuser/SqlConnectionsUpdateChecker.cs @@ -1,6 +1,7 @@ using System; using System.Data; using System.Data.Common; +using System.Runtime.Versioning; using System.Threading; using mRemoteNG.App; using mRemoteNG.Config.DatabaseConnectors; @@ -8,6 +9,7 @@ using mRemoteNG.Messages; namespace mRemoteNG.Config.Connections.Multiuser { + [SupportedOSPlatform("windows")] public class SqlConnectionsUpdateChecker : IConnectionsUpdateChecker { private readonly IDatabaseConnector _dbConnector; diff --git a/mRemoteNG/Config/Putty/PuttySessionsRegistryProvider.cs b/mRemoteNG/Config/Putty/PuttySessionsRegistryProvider.cs index 3f91a472b..91815d519 100644 --- a/mRemoteNG/Config/Putty/PuttySessionsRegistryProvider.cs +++ b/mRemoteNG/Config/Putty/PuttySessionsRegistryProvider.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Management; using System.Net; +using System.Runtime.Versioning; using System.Security.Principal; using Microsoft.Win32; using mRemoteNG.App; @@ -12,6 +13,7 @@ using mRemoteNG.Messages; namespace mRemoteNG.Config.Putty { + [SupportedOSPlatform("windows")] public class PuttySessionsRegistryProvider : AbstractPuttySessionsProvider { private const string PuttySessionsKey = "Software\\SimonTatham\\PuTTY\\Sessions"; diff --git a/mRemoteNG/Config/Serializers/MiscSerializers/ActiveDirectoryDeserializer.cs b/mRemoteNG/Config/Serializers/MiscSerializers/ActiveDirectoryDeserializer.cs index 15ca955c6..4b567d875 100644 --- a/mRemoteNG/Config/Serializers/MiscSerializers/ActiveDirectoryDeserializer.cs +++ b/mRemoteNG/Config/Serializers/MiscSerializers/ActiveDirectoryDeserializer.cs @@ -10,9 +10,11 @@ using mRemoteNG.Tools; using mRemoteNG.Tree; using mRemoteNG.Tree.Root; using mRemoteNG.Resources.Language; +using System.Runtime.Versioning; namespace mRemoteNG.Config.Serializers.MiscSerializers { + [SupportedOSPlatform("windows")] public class ActiveDirectoryDeserializer { private readonly string _ldapPath; diff --git a/mRemoteNG/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializer.cs b/mRemoteNG/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializer.cs index 43ce5977d..bc427c1cc 100644 --- a/mRemoteNG/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializer.cs +++ b/mRemoteNG/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializer.cs @@ -10,10 +10,12 @@ using mRemoteNG.Container; using mRemoteNG.Tree; using mRemoteNG.Tree.Root; using mRemoteNG.Resources.Language; +using System.Runtime.Versioning; namespace mRemoteNG.Config.Serializers.MiscSerializers { - public class RemoteDesktopConnectionManagerDeserializer : IDeserializer + [SupportedOSPlatform("windows")] + public class RemoteDesktopConnectionManagerDeserializer : IDeserializer { private static int _schemaVersion; /* 1 = RDCMan v2.2 3 = RDCMan v2.7 */ diff --git a/mRemoteNG/Connection/ConnectionIcon.cs b/mRemoteNG/Connection/ConnectionIcon.cs index 60bae3c18..7d28d16f1 100644 --- a/mRemoteNG/Connection/ConnectionIcon.cs +++ b/mRemoteNG/Connection/ConnectionIcon.cs @@ -1,11 +1,13 @@ -using System; +using System; using System.ComponentModel; +using System.Runtime.Versioning; using mRemoteNG.App; using mRemoteNG.App.Info; namespace mRemoteNG.Connection { + [SupportedOSPlatform("windows")] public class ConnectionIcon : StringConverter { public static string[] Icons = { }; diff --git a/mRemoteNG/Connection/ConnectionInitiator.cs b/mRemoteNG/Connection/ConnectionInitiator.cs index 39e38cfd3..d5673791c 100644 --- a/mRemoteNG/Connection/ConnectionInitiator.cs +++ b/mRemoteNG/Connection/ConnectionInitiator.cs @@ -12,10 +12,11 @@ using mRemoteNG.UI.Tabs; using mRemoteNG.UI.Window; using WeifenLuo.WinFormsUI.Docking; using mRemoteNG.Resources.Language; - +using System.Runtime.Versioning; namespace mRemoteNG.Connection { + [SupportedOSPlatform("windows")] public class ConnectionInitiator : IConnectionInitiator { private readonly PanelAdder _panelAdder = new PanelAdder(); diff --git a/mRemoteNG/Connection/ConnectionsService.cs b/mRemoteNG/Connection/ConnectionsService.cs index acfc9127b..e4d92f90a 100644 --- a/mRemoteNG/Connection/ConnectionsService.cs +++ b/mRemoteNG/Connection/ConnectionsService.cs @@ -19,10 +19,12 @@ using mRemoteNG.Tree; using mRemoteNG.Tree.Root; using mRemoteNG.UI; using mRemoteNG.Resources.Language; +using System.Runtime.Versioning; namespace mRemoteNG.Connection { - public class ConnectionsService + [SupportedOSPlatform("windows")] + public class ConnectionsService { private static readonly object SaveLock = new object(); private readonly PuttySessionsManager _puttySessionsManager; diff --git a/mRemoteNG/Connection/Protocol/ProtocolBase.cs b/mRemoteNG/Connection/Protocol/ProtocolBase.cs index cbe7e3d4b..ae83169c6 100644 --- a/mRemoteNG/Connection/Protocol/ProtocolBase.cs +++ b/mRemoteNG/Connection/Protocol/ProtocolBase.cs @@ -4,11 +4,13 @@ using System; using System.Threading; using System.Windows.Forms; using mRemoteNG.UI.Tabs; +using System.Runtime.Versioning; // ReSharper disable UnusedMember.Local namespace mRemoteNG.Connection.Protocol { + [SupportedOSPlatform("windows")] public abstract class ProtocolBase : IDisposable { #region Private Variables diff --git a/mRemoteNG/Connection/Protocol/PuttyBase.cs b/mRemoteNG/Connection/Protocol/PuttyBase.cs index 0fe7a7dde..18efa712c 100644 --- a/mRemoteNG/Connection/Protocol/PuttyBase.cs +++ b/mRemoteNG/Connection/Protocol/PuttyBase.cs @@ -12,11 +12,13 @@ using System.Windows.Forms; using mRemoteNG.Properties; using mRemoteNG.Resources.Language; using System.IO; +using System.Runtime.Versioning; // ReSharper disable ArrangeAccessorOwnerBody namespace mRemoteNG.Connection.Protocol { + [SupportedOSPlatform("windows")] public class PuttyBase : ProtocolBase { private const int IDM_RECONF = 0x50; // PuTTY Settings Menu ID diff --git a/mRemoteNG/Connection/Protocol/RDP/RdpProtocol6.cs b/mRemoteNG/Connection/Protocol/RDP/RdpProtocol6.cs index aa26acac7..90f8e0cfe 100644 --- a/mRemoteNG/Connection/Protocol/RDP/RdpProtocol6.cs +++ b/mRemoteNG/Connection/Protocol/RDP/RdpProtocol6.cs @@ -17,9 +17,11 @@ using MSTSCLib; using mRemoteNG.Resources.Language; using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel; using System.DirectoryServices.ActiveDirectory; +using System.Runtime.Versioning; namespace mRemoteNG.Connection.Protocol.RDP { + [SupportedOSPlatform("windows")] public class RdpProtocol6 : ProtocolBase, ISupportsViewOnly { /* RDP v8 requires Windows 7 with: diff --git a/mRemoteNG/Connection/Protocol/RDP/RdpProtocol8.cs b/mRemoteNG/Connection/Protocol/RDP/RdpProtocol8.cs index d3bf69f4b..f8c7c3652 100644 --- a/mRemoteNG/Connection/Protocol/RDP/RdpProtocol8.cs +++ b/mRemoteNG/Connection/Protocol/RDP/RdpProtocol8.cs @@ -1,129 +1,129 @@ -using System; -using System.Drawing; -using System.Windows.Forms; -using AxMSTSCLib; -using mRemoteNG.App; -using mRemoteNG.Messages; -using MSTSCLib; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Connection.Protocol.RDP -{ - /* RDP v8 requires Windows 7 with: - * https://support.microsoft.com/en-us/kb/2592687 - * OR - * https://support.microsoft.com/en-us/kb/2923545 - * - * Windows 8+ support RDP v8 out of the box. - */ - public class RdpProtocol8 : RdpProtocol7 - { - private MsRdpClient8NotSafeForScripting RdpClient8 => (MsRdpClient8NotSafeForScripting)((AxHost)Control).GetOcx(); - private Size _controlBeginningSize; - - protected override RdpVersion RdpProtocolVersion => RdpVersion.Rdc8; - - public override bool SmartSize - { - get => base.SmartSize; - protected set - { - base.SmartSize = value; - DoResizeClient(); - } - } - - public override bool Fullscreen - { - get => base.Fullscreen; - protected set - { - base.Fullscreen = value; - DoResizeClient(); - } - } - - public override void ResizeBegin(object sender, EventArgs e) - { - _controlBeginningSize = Control.Size; - } - - public override void Resize(object sender, EventArgs e) - { - if (DoResizeControl() && _controlBeginningSize.IsEmpty) - { - DoResizeClient(); - } - base.Resize(sender, e); - } - - public override void ResizeEnd(object sender, EventArgs e) - { - DoResizeControl(); - if (!(Control.Size == _controlBeginningSize)) - { - DoResizeClient(); - } - _controlBeginningSize = Size.Empty; - } - - protected override AxHost CreateActiveXRdpClientControl() - { - return new AxMsRdpClient8NotSafeForScripting(); - } - - private void DoResizeClient() - { - if (!loginComplete) - return; - - if (!InterfaceControl.Info.AutomaticResize) - return; - - if (!(InterfaceControl.Info.Resolution == RDPResolutions.FitToWindow || - InterfaceControl.Info.Resolution == RDPResolutions.Fullscreen)) - return; - - if (SmartSize) - return; - - Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, - $"Resizing RDP connection to host '{connectionInfo.Hostname}'"); - - try - { - var size = Fullscreen - ? Screen.FromControl(Control).Bounds.Size +using System; +using System.Drawing; +using System.Windows.Forms; +using AxMSTSCLib; +using mRemoteNG.App; +using mRemoteNG.Messages; +using MSTSCLib; +using mRemoteNG.Resources.Language; + +namespace mRemoteNG.Connection.Protocol.RDP +{ + /* RDP v8 requires Windows 7 with: + * https://support.microsoft.com/en-us/kb/2592687 + * OR + * https://support.microsoft.com/en-us/kb/2923545 + * + * Windows 8+ support RDP v8 out of the box. + */ + public class RdpProtocol8 : RdpProtocol7 + { + private MsRdpClient8NotSafeForScripting RdpClient8 => (MsRdpClient8NotSafeForScripting)((AxHost)Control).GetOcx(); + private Size _controlBeginningSize; + + protected override RdpVersion RdpProtocolVersion => RdpVersion.Rdc8; + + public override bool SmartSize + { + get => base.SmartSize; + protected set + { + base.SmartSize = value; + DoResizeClient(); + } + } + + public override bool Fullscreen + { + get => base.Fullscreen; + protected set + { + base.Fullscreen = value; + DoResizeClient(); + } + } + + public override void ResizeBegin(object sender, EventArgs e) + { + _controlBeginningSize = Control.Size; + } + + public override void Resize(object sender, EventArgs e) + { + if (DoResizeControl() && _controlBeginningSize.IsEmpty) + { + DoResizeClient(); + } + base.Resize(sender, e); + } + + public override void ResizeEnd(object sender, EventArgs e) + { + DoResizeControl(); + if (!(Control.Size == _controlBeginningSize)) + { + DoResizeClient(); + } + _controlBeginningSize = Size.Empty; + } + + protected override AxHost CreateActiveXRdpClientControl() + { + return new AxMsRdpClient8NotSafeForScripting(); + } + + private void DoResizeClient() + { + if (!loginComplete) + return; + + if (!InterfaceControl.Info.AutomaticResize) + return; + + if (!(InterfaceControl.Info.Resolution == RDPResolutions.FitToWindow || + InterfaceControl.Info.Resolution == RDPResolutions.Fullscreen)) + return; + + if (SmartSize) + return; + + Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, + $"Resizing RDP connection to host '{connectionInfo.Hostname}'"); + + try + { + var size = Fullscreen + ? Screen.FromControl(Control).Bounds.Size : Control.Size; - UpdateSessionDisplaySettings((uint)size.Width, (uint)size.Height); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage( - string.Format(Language.ChangeConnectionResolutionError, - connectionInfo.Hostname), - ex, MessageClass.WarningMsg, false); - } - } - - private bool DoResizeControl() - { - Control.Location = InterfaceControl.Location; - // kmscode - this doesn't look right to me. But I'm not aware of any functionality issues with this currently... - if (!(Control.Size == InterfaceControl.Size) && !(InterfaceControl.Size == Size.Empty)) - { - Control.Size = InterfaceControl.Size; - return true; - } - else - { - return false; - } - } - - protected virtual void UpdateSessionDisplaySettings(uint width, uint height) - { + UpdateSessionDisplaySettings((uint)size.Width, (uint)size.Height); + } + catch (Exception ex) + { + Runtime.MessageCollector.AddExceptionMessage( + string.Format(Language.ChangeConnectionResolutionError, + connectionInfo.Hostname), + ex, MessageClass.WarningMsg, false); + } + } + + private bool DoResizeControl() + { + Control.Location = InterfaceControl.Location; + // kmscode - this doesn't look right to me. But I'm not aware of any functionality issues with this currently... + if (!(Control.Size == InterfaceControl.Size) && !(InterfaceControl.Size == Size.Empty)) + { + Control.Size = InterfaceControl.Size; + return true; + } + else + { + return false; + } + } + + protected virtual void UpdateSessionDisplaySettings(uint width, uint height) + { RdpClient8.Reconnect(width, height); - } - } -} + } + } +} diff --git a/mRemoteNG/Credential/PlaceholderCredentialRecord.cs b/mRemoteNG/Credential/PlaceholderCredentialRecord.cs index 9916893ba..7a7710b0f 100644 --- a/mRemoteNG/Credential/PlaceholderCredentialRecord.cs +++ b/mRemoteNG/Credential/PlaceholderCredentialRecord.cs @@ -2,11 +2,13 @@ using System.Collections.Generic; using System.ComponentModel; using System.Linq; +using System.Runtime.Versioning; using System.Security; using mRemoteNG.Resources.Language; namespace mRemoteNG.Credential { + [SupportedOSPlatform("windows")] public class PlaceholderCredentialRecord : ICredentialRecord { public event PropertyChangedEventHandler PropertyChanged; diff --git a/mRemoteNG/Properties/AssemblyInfo.cs b/mRemoteNG/Properties/AssemblyInfo.cs index af6e90e35..47e511533 100644 --- a/mRemoteNG/Properties/AssemblyInfo.cs +++ b/mRemoteNG/Properties/AssemblyInfo.cs @@ -15,8 +15,8 @@ using System.Resources; [assembly: AssemblyCulture("")] // Version information -[assembly: AssemblyVersion("1.77.3.1803")] -[assembly: AssemblyFileVersion("1.77.3.1803")] +[assembly: AssemblyVersion("1.77.3.1812")] +[assembly: AssemblyFileVersion("1.77.3.1812")] [assembly: NeutralResourcesLanguageAttribute("en-US")] -[assembly: AssemblyInformationalVersion("1.77.3 (Nightly Build: 1803)")] +[assembly: AssemblyInformationalVersion("1.77.3 (Nightly Build: 1812)")] diff --git a/mRemoteNG/Properties/rbac.Designer.cs b/mRemoteNG/Properties/rbac.Designer.cs index 2162d3a0c..415669c6d 100644 --- a/mRemoteNG/Properties/rbac.Designer.cs +++ b/mRemoteNG/Properties/rbac.Designer.cs @@ -8,9 +8,11 @@ // //------------------------------------------------------------------------------ +using System.Runtime.Versioning; + namespace mRemoteNG.Properties { - - + [SupportedOSPlatform("windows")] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0")] internal sealed partial class rbac : global::System.Configuration.ApplicationSettingsBase { diff --git a/mRemoteNG/Resources/ImageConverter.cs b/mRemoteNG/Resources/ImageConverter.cs index b4d9811fe..a32043930 100644 --- a/mRemoteNG/Resources/ImageConverter.cs +++ b/mRemoteNG/Resources/ImageConverter.cs @@ -1,7 +1,9 @@ using System.Drawing; +using System.Runtime.Versioning; namespace mRemoteNG.Resources { + [SupportedOSPlatform("windows")] class ImageConverter { /// diff --git a/mRemoteNG/Tools/ADhelper.cs b/mRemoteNG/Tools/ADhelper.cs index 88387b8e6..a623d5b44 100644 --- a/mRemoteNG/Tools/ADhelper.cs +++ b/mRemoteNG/Tools/ADhelper.cs @@ -2,9 +2,11 @@ using System.Collections; using System.DirectoryServices; using System.Runtime.InteropServices; +using System.Runtime.Versioning; namespace mRemoteNG.Tools { + [SupportedOSPlatform("windows")] public class AdHelper { private DirectoryEntry _dEntry; diff --git a/mRemoteNG/Tools/ExternalTool.cs b/mRemoteNG/Tools/ExternalTool.cs index 7133a9d99..efb157722 100644 --- a/mRemoteNG/Tools/ExternalTool.cs +++ b/mRemoteNG/Tools/ExternalTool.cs @@ -4,6 +4,7 @@ using System.ComponentModel; using System.Diagnostics; using System.Drawing; using System.IO; +using System.Runtime.Versioning; using mRemoteNG.App; using mRemoteNG.Connection; using mRemoteNG.Connection.Protocol; @@ -15,6 +16,7 @@ using mRemoteNG.Resources.Language; namespace mRemoteNG.Tools { + [SupportedOSPlatform("windows")] public class ExternalTool : INotifyPropertyChanged { private string _displayName; diff --git a/mRemoteNG/Tools/IeBrowserEmulation.cs b/mRemoteNG/Tools/IeBrowserEmulation.cs index 8e89d2c01..37e2c7a23 100644 --- a/mRemoteNG/Tools/IeBrowserEmulation.cs +++ b/mRemoteNG/Tools/IeBrowserEmulation.cs @@ -2,12 +2,14 @@ using System.Diagnostics; using System.IO; using System.Linq; +using System.Runtime.Versioning; using System.Security.AccessControl; using Microsoft.Win32; using mRemoteNG.App; namespace mRemoteNG.Tools { + [SupportedOSPlatform("windows")] public class IeBrowserEmulation { // found this here: diff --git a/mRemoteNG/Tools/MiscTools.cs b/mRemoteNG/Tools/MiscTools.cs index b81a8a09a..76c04a535 100644 --- a/mRemoteNG/Tools/MiscTools.cs +++ b/mRemoteNG/Tools/MiscTools.cs @@ -14,9 +14,11 @@ using MySql.Data.Types; using mRemoteNG.Resources.Language; using static System.String; using System.Windows; +using System.Runtime.Versioning; namespace mRemoteNG.Tools { + [SupportedOSPlatform("windows")] public static class MiscTools { public static Icon GetIconFromFile(string FileName) diff --git a/mRemoteNG/Tools/NotificationAreaIcon.cs b/mRemoteNG/Tools/NotificationAreaIcon.cs index 283cc2c72..719ba217b 100644 --- a/mRemoteNG/Tools/NotificationAreaIcon.cs +++ b/mRemoteNG/Tools/NotificationAreaIcon.cs @@ -7,10 +7,12 @@ using mRemoteNG.Container; using mRemoteNG.Properties; using mRemoteNG.UI.Forms; using mRemoteNG.Resources.Language; +using System.Runtime.Versioning; namespace mRemoteNG.Tools { + [SupportedOSPlatform("windows")] public class NotificationAreaIcon { private readonly NotifyIcon _nI; diff --git a/mRemoteNG/Tools/WindowMenu.cs b/mRemoteNG/Tools/WindowMenu.cs index 74776eb14..7001ea585 100644 --- a/mRemoteNG/Tools/WindowMenu.cs +++ b/mRemoteNG/Tools/WindowMenu.cs @@ -2,11 +2,13 @@ using System.Drawing; using mRemoteNG.App; using Microsoft.Win32.SafeHandles; +using System.Runtime.Versioning; // ReSharper disable MemberCanBeMadeStatic.Global namespace mRemoteNG.Tools { + [SupportedOSPlatform("windows")] public sealed class WindowMenu : SafeHandleZeroOrMinusOneIsInvalid, IDisposable { [Flags] diff --git a/mRemoteNG/Tools/WindowsRegistry/WindowsRegistry.cs b/mRemoteNG/Tools/WindowsRegistry/WindowsRegistry.cs index b17745029..f121cd6db 100644 --- a/mRemoteNG/Tools/WindowsRegistry/WindowsRegistry.cs +++ b/mRemoteNG/Tools/WindowsRegistry/WindowsRegistry.cs @@ -1,9 +1,11 @@ using System; using System.Linq; +using System.Runtime.Versioning; using Microsoft.Win32; namespace mRemoteNG.Tools.WindowsRegistry { + [SupportedOSPlatform("windows")] public class WindowsRegistry : IRegistry { public string[] GetSubKeyNames(RegistryHive hive, string keyPath) diff --git a/mRemoteNG/UI/Controls/ConnectionContextMenu.cs b/mRemoteNG/UI/Controls/ConnectionContextMenu.cs index 08ceddd9e..a90deb0f3 100644 --- a/mRemoteNG/UI/Controls/ConnectionContextMenu.cs +++ b/mRemoteNG/UI/Controls/ConnectionContextMenu.cs @@ -11,12 +11,14 @@ using mRemoteNG.Tools.Clipboard; using mRemoteNG.Tree; using mRemoteNG.Tree.Root; using mRemoteNG.Resources.Language; +using System.Runtime.Versioning; // ReSharper disable UnusedParameter.Local namespace mRemoteNG.UI.Controls { + [SupportedOSPlatform("windows")] public sealed class ConnectionContextMenu : ContextMenuStrip { private ToolStripMenuItem _cMenTreeAddConnection; diff --git a/mRemoteNG/UI/Controls/ConnectionTree/ConnectionTree.cs b/mRemoteNG/UI/Controls/ConnectionTree/ConnectionTree.cs index 3a679910b..f75dcc27e 100644 --- a/mRemoteNG/UI/Controls/ConnectionTree/ConnectionTree.cs +++ b/mRemoteNG/UI/Controls/ConnectionTree/ConnectionTree.cs @@ -16,11 +16,13 @@ using mRemoteNG.Tree; using mRemoteNG.Tree.ClickHandlers; using mRemoteNG.Tree.Root; using mRemoteNG.Resources.Language; +using System.Runtime.Versioning; // ReSharper disable ArrangeAccessorOwnerBody namespace mRemoteNG.UI.Controls.ConnectionTree { + [SupportedOSPlatform("windows")] public partial class ConnectionTree : TreeListView, IConnectionTree { private readonly ConnectionTreeDragAndDropHandler _dragAndDropHandler = new ConnectionTreeDragAndDropHandler(); diff --git a/mRemoteNG/UI/Controls/HeadlessTabControl.cs b/mRemoteNG/UI/Controls/HeadlessTabControl.cs index 07b06960c..920dfca6a 100644 --- a/mRemoteNG/UI/Controls/HeadlessTabControl.cs +++ b/mRemoteNG/UI/Controls/HeadlessTabControl.cs @@ -1,9 +1,11 @@ using System; +using System.Runtime.Versioning; using System.Windows.Forms; using mRemoteNG.App; namespace mRemoteNG.UI.Controls { + [SupportedOSPlatform("windows")] public class HeadlessTabControl : TabControl { protected override void WndProc(ref Message m) diff --git a/mRemoteNG/UI/Controls/PageSequence/SequencedControl.cs b/mRemoteNG/UI/Controls/PageSequence/SequencedControl.cs index 4e4f4681f..62e9e11ea 100644 --- a/mRemoteNG/UI/Controls/PageSequence/SequencedControl.cs +++ b/mRemoteNG/UI/Controls/PageSequence/SequencedControl.cs @@ -1,9 +1,11 @@ using System; +using System.Runtime.Versioning; using System.Windows.Forms; using mRemoteNG.Themes; namespace mRemoteNG.UI.Controls.PageSequence { + [SupportedOSPlatform("windows")] public class SequencedControl : UserControl, ISequenceChangingNotifier { public event EventHandler Next; diff --git a/mRemoteNG/UI/Controls/QuickConnectComboBox.cs b/mRemoteNG/UI/Controls/QuickConnectComboBox.cs index 1a1a4038e..e3272296b 100644 --- a/mRemoteNG/UI/Controls/QuickConnectComboBox.cs +++ b/mRemoteNG/UI/Controls/QuickConnectComboBox.cs @@ -1,5 +1,6 @@ using System; using System.Drawing; +using System.Runtime.Versioning; using System.Windows.Forms; using mRemoteNG.App; using mRemoteNG.Connection; @@ -8,6 +9,7 @@ using mRemoteNG.Resources.Language; namespace mRemoteNG.UI.Controls { + [SupportedOSPlatform("windows")] public class QuickConnectComboBox : ToolStripComboBox { private readonly ComboBox _comboBox; diff --git a/mRemoteNG/UI/Controls/mrngButton.cs b/mRemoteNG/UI/Controls/mrngButton.cs index 7d9f0ef49..e6e48041b 100644 --- a/mRemoteNG/UI/Controls/mrngButton.cs +++ b/mRemoteNG/UI/Controls/mrngButton.cs @@ -1,11 +1,13 @@ using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Text; +using System.Runtime.Versioning; using System.Windows.Forms; using mRemoteNG.Themes; namespace mRemoteNG.UI.Controls { + [SupportedOSPlatform("windows")] [ToolboxBitmap(typeof(Button))] //Extended button class, the button onPaint completely repaint the control public class MrngButton : Button diff --git a/mRemoteNG/UI/Controls/mrngCheckBox.cs b/mRemoteNG/UI/Controls/mrngCheckBox.cs index a9e3202f7..35447ad43 100644 --- a/mRemoteNG/UI/Controls/mrngCheckBox.cs +++ b/mRemoteNG/UI/Controls/mrngCheckBox.cs @@ -1,9 +1,11 @@ using System.Drawing; +using System.Runtime.Versioning; using System.Windows.Forms; using mRemoteNG.Themes; namespace mRemoteNG.UI.Controls { + [SupportedOSPlatform("windows")] //Extended CheckBox class, the NGCheckBox onPaint completely repaint the control // diff --git a/mRemoteNG/UI/Controls/mrngComboBox.cs b/mRemoteNG/UI/Controls/mrngComboBox.cs index de473cc66..f90b523fa 100644 --- a/mRemoteNG/UI/Controls/mrngComboBox.cs +++ b/mRemoteNG/UI/Controls/mrngComboBox.cs @@ -1,9 +1,11 @@ using System.Drawing; +using System.Runtime.Versioning; using System.Windows.Forms; using mRemoteNG.Themes; namespace mRemoteNG.UI.Controls { + [SupportedOSPlatform("windows")] //Extended ComboBox class, the NGComboBox onPaint completely repaint the control as does the item painting //warning: THe DropDown style rendering is glitchy in this control, only use DropDownList or correct the rendering method internal class MrngComboBox : ComboBox diff --git a/mRemoteNG/UI/Controls/mrngGroupBox.cs b/mRemoteNG/UI/Controls/mrngGroupBox.cs index cfc1f1fcb..5f3c53709 100644 --- a/mRemoteNG/UI/Controls/mrngGroupBox.cs +++ b/mRemoteNG/UI/Controls/mrngGroupBox.cs @@ -1,9 +1,11 @@ using System.Drawing; +using System.Runtime.Versioning; using System.Windows.Forms; using mRemoteNG.Themes; namespace mRemoteNG.UI.Controls { + [SupportedOSPlatform("windows")] //Groupbox is colored using the innerTab colors as the vstheme doesnt have explicit groupbox palettes (at least completes) //This clas completely repaints the control public class MrngGroupBox : GroupBox diff --git a/mRemoteNG/UI/Controls/mrngIpTextBox.cs b/mRemoteNG/UI/Controls/mrngIpTextBox.cs index 3ad5dc489..134314a1c 100644 --- a/mRemoteNG/UI/Controls/mrngIpTextBox.cs +++ b/mRemoteNG/UI/Controls/mrngIpTextBox.cs @@ -7,9 +7,11 @@ using System; using System.Windows.Forms; using mRemoteNG.Themes; using mRemoteNG.Resources.Language; +using System.Runtime.Versioning; namespace mRemoteNG.UI.Controls { + [SupportedOSPlatform("windows")] /* class IPTextBox * An IP Address Box * A TextBox that only allows entry of a valid ip address diff --git a/mRemoteNG/UI/Controls/mrngLabel.cs b/mRemoteNG/UI/Controls/mrngLabel.cs index db4c8f35c..96b92e023 100644 --- a/mRemoteNG/UI/Controls/mrngLabel.cs +++ b/mRemoteNG/UI/Controls/mrngLabel.cs @@ -2,9 +2,11 @@ using mRemoteNG.Themes; using System.Drawing; using System.Windows.Forms; +using System.Runtime.Versioning; namespace mRemoteNG.UI.Controls { + [SupportedOSPlatform("windows")] //Themable label to overide the winforms behavior of drawing the forecolor of disabled with a system color //This class repaints the control to avoid Disabled state mismatch of the theme [ToolboxBitmap(typeof(Label))] diff --git a/mRemoteNG/UI/Controls/mrngListView.cs b/mRemoteNG/UI/Controls/mrngListView.cs index 9587eb04a..13a8580eb 100644 --- a/mRemoteNG/UI/Controls/mrngListView.cs +++ b/mRemoteNG/UI/Controls/mrngListView.cs @@ -1,10 +1,12 @@ using System.ComponentModel; using System.Drawing; +using System.Runtime.Versioning; using BrightIdeasSoftware; using mRemoteNG.Themes; namespace mRemoteNG.UI.Controls { + [SupportedOSPlatform("windows")] //Simple coloring of ObjectListView //This is subclassed to avoid repeating the code in multiple places internal class MrngListView : ObjectListView diff --git a/mRemoteNG/UI/Controls/mrngNumericUpDown.cs b/mRemoteNG/UI/Controls/mrngNumericUpDown.cs index 6a52361a7..9d6c0861d 100644 --- a/mRemoteNG/UI/Controls/mrngNumericUpDown.cs +++ b/mRemoteNG/UI/Controls/mrngNumericUpDown.cs @@ -1,5 +1,6 @@ using System; using System.Drawing; +using System.Runtime.Versioning; using System.Windows.Forms; using mRemoteNG.Themes; @@ -7,6 +8,7 @@ using mRemoteNG.Themes; namespace mRemoteNG.UI.Controls { + [SupportedOSPlatform("windows")] //Repaint of the NumericUpDown, the composite control buttons are replaced because the //original ones cannot be themed due to protected inheritance internal class MrngNumericUpDown : NumericUpDown diff --git a/mRemoteNG/UI/Controls/mrngProgressBar.cs b/mRemoteNG/UI/Controls/mrngProgressBar.cs index 0047dd31c..aaff26a41 100644 --- a/mRemoteNG/UI/Controls/mrngProgressBar.cs +++ b/mRemoteNG/UI/Controls/mrngProgressBar.cs @@ -1,9 +1,11 @@ using mRemoteNG.Themes; using System.Drawing; +using System.Runtime.Versioning; using System.Windows.Forms; namespace mRemoteNG.UI.Controls { + [SupportedOSPlatform("windows")] // Repaint of a ProgressBar on a flat style internal class MrngProgressBar : ProgressBar { diff --git a/mRemoteNG/UI/Controls/mrngRadioButton.cs b/mRemoteNG/UI/Controls/mrngRadioButton.cs index 56adb19b8..988f1fb54 100644 --- a/mRemoteNG/UI/Controls/mrngRadioButton.cs +++ b/mRemoteNG/UI/Controls/mrngRadioButton.cs @@ -1,10 +1,12 @@ using mRemoteNG.Themes; using System.Drawing; using System.Drawing.Drawing2D; +using System.Runtime.Versioning; using System.Windows.Forms; namespace mRemoteNG.UI.Controls { + [SupportedOSPlatform("windows")] // total replace of RadioButton to avoid disabled state inconsistency on the themes // and glyph color inconsistency class MrngRadioButton : RadioButton diff --git a/mRemoteNG/UI/Controls/mrngTextBox.cs b/mRemoteNG/UI/Controls/mrngTextBox.cs index e40ef7089..552f663ac 100644 --- a/mRemoteNG/UI/Controls/mrngTextBox.cs +++ b/mRemoteNG/UI/Controls/mrngTextBox.cs @@ -1,10 +1,12 @@ using System; using System.Drawing; +using System.Runtime.Versioning; using System.Windows.Forms; using mRemoteNG.Themes; namespace mRemoteNG.UI.Controls { + [SupportedOSPlatform("windows")] //This class is only minimally themed as textboxes onPaint are hard to theme (system wm paint control most of the drawing process //There are some glitches on the initial draw of some controls public class MrngTextBox : TextBox diff --git a/mRemoteNG/UI/DisplayProperties.cs b/mRemoteNG/UI/DisplayProperties.cs index 2cf4ff15e..9098c3471 100644 --- a/mRemoteNG/UI/DisplayProperties.cs +++ b/mRemoteNG/UI/DisplayProperties.cs @@ -2,11 +2,13 @@ using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Imaging; +using System.Runtime.Versioning; using mRemoteNG.Tools; using mRemoteNG.UI.GraphicsUtilities; namespace mRemoteNG.UI { + [SupportedOSPlatform("windows")] public class DisplayProperties { private readonly IGraphicsProvider _graphicsProvider; diff --git a/mRemoteNG/UI/FontOverrider.cs b/mRemoteNG/UI/FontOverrider.cs index a1267c696..08d7092e3 100644 --- a/mRemoteNG/UI/FontOverrider.cs +++ b/mRemoteNG/UI/FontOverrider.cs @@ -1,8 +1,10 @@ using System.Drawing; +using System.Runtime.Versioning; using System.Windows.Forms; namespace mRemoteNG.UI { + [SupportedOSPlatform("windows")] public class FontOverrider { public static void FontOverride(Control ctlParent) diff --git a/mRemoteNG/UI/Forms/OptionsPages/OptionsPage.cs b/mRemoteNG/UI/Forms/OptionsPages/OptionsPage.cs index 2765fe7b8..80ec17810 100644 --- a/mRemoteNG/UI/Forms/OptionsPages/OptionsPage.cs +++ b/mRemoteNG/UI/Forms/OptionsPages/OptionsPage.cs @@ -1,10 +1,12 @@ using System.ComponentModel; using System.Drawing; +using System.Runtime.Versioning; using System.Windows.Forms; using mRemoteNG.Themes; namespace mRemoteNG.UI.Forms.OptionsPages { + [SupportedOSPlatform("windows")] public class OptionsPage : UserControl { protected OptionsPage() diff --git a/mRemoteNG/UI/Forms/frmMain.cs b/mRemoteNG/UI/Forms/frmMain.cs index f758ba1ca..7039c43ec 100644 --- a/mRemoteNG/UI/Forms/frmMain.cs +++ b/mRemoteNG/UI/Forms/frmMain.cs @@ -32,12 +32,14 @@ using mRemoteNG.UI.Panels; using WeifenLuo.WinFormsUI.Docking; using mRemoteNG.UI.Controls; using mRemoteNG.Resources.Language; +using System.Runtime.Versioning; #endregion // ReSharper disable MemberCanBePrivate.Global namespace mRemoteNG.UI.Forms { + [SupportedOSPlatform("windows")] public partial class FrmMain { public static FrmMain Default { get; } = new FrmMain(); diff --git a/mRemoteNG/UI/GraphicsUtilities/GdiPlusGraphicsProvider.cs b/mRemoteNG/UI/GraphicsUtilities/GdiPlusGraphicsProvider.cs index 074093c0e..f3a39a165 100644 --- a/mRemoteNG/UI/GraphicsUtilities/GdiPlusGraphicsProvider.cs +++ b/mRemoteNG/UI/GraphicsUtilities/GdiPlusGraphicsProvider.cs @@ -1,8 +1,10 @@ using System.Drawing; +using System.Runtime.Versioning; using System.Windows.Forms; namespace mRemoteNG.UI.GraphicsUtilities { + [SupportedOSPlatform("windows")] /// /// Gets environment graphics information using the Windows GDI+ API. /// diff --git a/mRemoteNG/UI/Menu/msMain/ViewMenu.cs b/mRemoteNG/UI/Menu/msMain/ViewMenu.cs index 248b48633..5a0a0be1c 100644 --- a/mRemoteNG/UI/Menu/msMain/ViewMenu.cs +++ b/mRemoteNG/UI/Menu/msMain/ViewMenu.cs @@ -1,4 +1,5 @@ using System; +using System.Runtime.Versioning; using System.Windows.Forms; using mRemoteNG.App; using mRemoteNG.Properties; @@ -9,6 +10,7 @@ using mRemoteNG.UI.Window; namespace mRemoteNG.UI.Menu { + [SupportedOSPlatform("windows")] public class ViewMenu : ToolStripMenuItem { private ToolStripMenuItem _mMenViewConnectionPanels; diff --git a/mRemoteNG/UI/StatusImageList.cs b/mRemoteNG/UI/StatusImageList.cs index 69f987bf7..ca6b6b2fb 100644 --- a/mRemoteNG/UI/StatusImageList.cs +++ b/mRemoteNG/UI/StatusImageList.cs @@ -1,5 +1,6 @@ using System; using System.Drawing; +using System.Runtime.Versioning; using System.Windows.Forms; using mRemoteNG.App; using mRemoteNG.Connection; @@ -8,6 +9,7 @@ using mRemoteNG.Tree.Root; namespace mRemoteNG.UI { + [SupportedOSPlatform("windows")] public class StatusImageList : IDisposable { public ImageList ImageList { get; } diff --git a/mRemoteNG/UI/Tabs/DockPaneStripNG.cs b/mRemoteNG/UI/Tabs/DockPaneStripNG.cs index 47e56f51e..c798621db 100644 --- a/mRemoteNG/UI/Tabs/DockPaneStripNG.cs +++ b/mRemoteNG/UI/Tabs/DockPaneStripNG.cs @@ -8,9 +8,11 @@ using mRemoteNG.Connection; using mRemoteNG.Properties; using WeifenLuo.WinFormsUI.Docking; using mRemoteNG.Resources.Language; +using System.Runtime.Versioning; namespace mRemoteNG.UI.Tabs { + [SupportedOSPlatform("windows")] /// /// This class is lifted from VS2013DockPaneStrip from DockPanelSuite and customized for MremoteNG /// diff --git a/mRemoteNG/UI/Tabs/MremoteNGAutoHideStrip.cs b/mRemoteNG/UI/Tabs/MremoteNGAutoHideStrip.cs index 38088ad37..86602854d 100644 --- a/mRemoteNG/UI/Tabs/MremoteNGAutoHideStrip.cs +++ b/mRemoteNG/UI/Tabs/MremoteNGAutoHideStrip.cs @@ -1,11 +1,13 @@ using System; using System.Drawing; using System.Drawing.Drawing2D; +using System.Runtime.Versioning; using System.Windows.Forms; using WeifenLuo.WinFormsUI.Docking; namespace mRemoteNG.UI.Tabs { + [SupportedOSPlatform("windows")] internal sealed class MremoteNGAutoHideStrip : AutoHideStripBase { private class TabNG : Tab diff --git a/mRemoteNG/UI/TaskDialog/CommandButton.cs b/mRemoteNG/UI/TaskDialog/CommandButton.cs index e94de6243..4123d37ec 100644 --- a/mRemoteNG/UI/TaskDialog/CommandButton.cs +++ b/mRemoteNG/UI/TaskDialog/CommandButton.cs @@ -3,10 +3,12 @@ using System; using System.ComponentModel; using System.Drawing; using System.Drawing.Drawing2D; +using System.Runtime.Versioning; using System.Windows.Forms; namespace mRemoteNG.UI.TaskDialog { + [SupportedOSPlatform("windows")] public sealed partial class CommandButton : Button { //-------------------------------------------------------------------------------- diff --git a/mRemoteNG/UI/TaskDialog/frmTaskDialog.cs b/mRemoteNG/UI/TaskDialog/frmTaskDialog.cs index 38eef4a6c..0a30e6cff 100644 --- a/mRemoteNG/UI/TaskDialog/frmTaskDialog.cs +++ b/mRemoteNG/UI/TaskDialog/frmTaskDialog.cs @@ -5,9 +5,11 @@ using System.Drawing; using System.Windows.Forms; using mRemoteNG.UI.Controls; using mRemoteNG.Resources.Language; +using System.Runtime.Versioning; namespace mRemoteNG.UI.TaskDialog { + [SupportedOSPlatform("windows")] public partial class frmTaskDialog : Form { //-------------------------------------------------------------------------------- diff --git a/mRemoteNG/UI/Window/BaseWindow.cs b/mRemoteNG/UI/Window/BaseWindow.cs index 993c2c0c5..d5845e80c 100644 --- a/mRemoteNG/UI/Window/BaseWindow.cs +++ b/mRemoteNG/UI/Window/BaseWindow.cs @@ -1,11 +1,13 @@ -using mRemoteNG.Themes; +using mRemoteNG.Themes; using WeifenLuo.WinFormsUI.Docking; +using System.Runtime.Versioning; // ReSharper disable UnusedAutoPropertyAccessor.Global namespace mRemoteNG.UI.Window { + [SupportedOSPlatform("windows")] public class BaseWindow : DockContent { #region Private Variables diff --git a/mRemoteNG/UI/Window/ConfigWindow.cs b/mRemoteNG/UI/Window/ConfigWindow.cs index 54b4b6f2b..2f06a7fbd 100644 --- a/mRemoteNG/UI/Window/ConfigWindow.cs +++ b/mRemoteNG/UI/Window/ConfigWindow.cs @@ -15,10 +15,12 @@ using mRemoteNG.Tree.Root; using mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid; using WeifenLuo.WinFormsUI.Docking; using mRemoteNG.Resources.Language; +using System.Runtime.Versioning; namespace mRemoteNG.UI.Window { + [SupportedOSPlatform("windows")] public class ConfigWindow : BaseWindow { private bool _originalPropertyGridToolStripItemCountValid; diff --git a/mRemoteNG/UI/Window/ConnectionWindow.cs b/mRemoteNG/UI/Window/ConnectionWindow.cs index 42dc43ea1..037e6b6b0 100644 --- a/mRemoteNG/UI/Window/ConnectionWindow.cs +++ b/mRemoteNG/UI/Window/ConnectionWindow.cs @@ -19,9 +19,11 @@ using mRemoteNG.UI.Tabs; using mRemoteNG.UI.TaskDialog; using WeifenLuo.WinFormsUI.Docking; using mRemoteNG.Resources.Language; +using System.Runtime.Versioning; namespace mRemoteNG.UI.Window { + [SupportedOSPlatform("windows")] public partial class ConnectionWindow : BaseWindow { private VisualStudioToolStripExtender vsToolStripExtender; diff --git a/mRemoteNG/UI/Window/SSHTransferWindow.cs b/mRemoteNG/UI/Window/SSHTransferWindow.cs index b102bf350..33c2f82e3 100644 --- a/mRemoteNG/UI/Window/SSHTransferWindow.cs +++ b/mRemoteNG/UI/Window/SSHTransferWindow.cs @@ -9,9 +9,11 @@ using mRemoteNG.Messages; using mRemoteNG.UI.Controls; using mRemoteNG.UI.Forms; using mRemoteNG.Resources.Language; +using System.Runtime.Versioning; namespace mRemoteNG.UI.Window { + [SupportedOSPlatform("windows")] public class SSHTransferWindow : BaseWindow { #region Form Init diff --git a/mRemoteNG/UI/Window/UltraVNCWindow.cs b/mRemoteNG/UI/Window/UltraVNCWindow.cs index e6d829d5c..4cb51fd1f 100644 --- a/mRemoteNG/UI/Window/UltraVNCWindow.cs +++ b/mRemoteNG/UI/Window/UltraVNCWindow.cs @@ -2,10 +2,12 @@ using mRemoteNG.App; using WeifenLuo.WinFormsUI.Docking; using mRemoteNG.Resources.Language; +using System.Runtime.Versioning; namespace mRemoteNG.UI.Window { + [SupportedOSPlatform("windows")] public class UltraVNCWindow : BaseWindow { #region Form Init diff --git a/mRemoteNG/mRemoteNG.csproj b/mRemoteNG/mRemoteNG.csproj index 56eb1e7f9..1b7d4a552 100644 --- a/mRemoteNG/mRemoteNG.csproj +++ b/mRemoteNG/mRemoteNG.csproj @@ -22,6 +22,7 @@ Multi-Remote Next Generation Connection Manager https://github.com/mRemoteNG/mRemoteNG.git git + mRemoteNG.App.ProgramRoot DEBUG diff --git a/mRemoteNGInstaller/Installer/Fragments/FilesFragment.wxs b/mRemoteNGInstaller/Installer/Fragments/FilesFragment.wxs index e9a91aaf0..2fc019a42 100644 --- a/mRemoteNGInstaller/Installer/Fragments/FilesFragment.wxs +++ b/mRemoteNGInstaller/Installer/Fragments/FilesFragment.wxs @@ -130,9 +130,6 @@ - - -