Skip to content

Commit

Permalink
Add AOT analyzers
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz committed May 20, 2024
1 parent eaac7e9 commit 2a2fe67
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CliWrap/CliWrap.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp3.0;net462</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp3.0;net462;net80</TargetFrameworks>
<IsPackable>true</IsPackable>
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">true</IsTrimmable>
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">true</IsAotCompatible>
</PropertyGroup>

<PropertyGroup>
Expand Down
3 changes: 3 additions & 0 deletions CliWrap/Command.Execution.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -103,6 +105,7 @@ private ProcessStartInfo CreateStartInfo()

if (Credentials.LoadUserProfile)
startInfo.LoadUserProfile = Credentials.LoadUserProfile;
#pragma warning restore CA1416
}
catch (NotSupportedException ex)
{
Expand Down

0 comments on commit 2a2fe67

Please sign in to comment.