From 2a2fe67622f039fa424b3854929b158abea768ea Mon Sep 17 00:00:00 2001 From: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com> Date: Mon, 20 May 2024 17:46:47 +0300 Subject: [PATCH] Add AOT analyzers --- CliWrap/CliWrap.csproj | 4 +++- CliWrap/Command.Execution.cs | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CliWrap/CliWrap.csproj b/CliWrap/CliWrap.csproj index c0cbe7c7..906fd4a8 100644 --- a/CliWrap/CliWrap.csproj +++ b/CliWrap/CliWrap.csproj @@ -1,8 +1,10 @@  - netstandard2.0;netstandard2.1;netcoreapp3.0;net462 + netstandard2.0;netstandard2.1;netcoreapp3.0;net462;net80 true + true + true diff --git a/CliWrap/Command.Execution.cs b/CliWrap/Command.Execution.cs index d5d74da5..5fed29d1 100644 --- a/CliWrap/Command.Execution.cs +++ b/CliWrap/Command.Execution.cs @@ -92,6 +92,8 @@ private ProcessStartInfo CreateStartInfo() // Set credentials try { + // Disable CA1416 because we're handling an exception that is thrown by the property setters +#pragma warning disable CA1416 if (Credentials.Domain is not null) startInfo.Domain = Credentials.Domain; @@ -103,6 +105,7 @@ private ProcessStartInfo CreateStartInfo() if (Credentials.LoadUserProfile) startInfo.LoadUserProfile = Credentials.LoadUserProfile; +#pragma warning restore CA1416 } catch (NotSupportedException ex) {