Skip to content

Commit

Permalink
Close #180: Add build checks for AOT compat
Browse files Browse the repository at this point in the history
  • Loading branch information
Bartleby2718 committed Mar 20, 2024
1 parent c10f385 commit 50b0fd8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<Project>
<PropertyGroup>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<!-- Recommended in https://devblogs.microsoft.com/dotnet/creating-aot-compatible-libraries/ -->
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">true</IsAotCompatible>
</PropertyGroup>
</Project>
2 changes: 2 additions & 0 deletions src/DistributedLock.Tests/DistributedLock.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<AssemblyOriginatorKeyFile>..\DistributedLock.snk</AssemblyOriginatorKeyFile>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>1591</NoWarn>
<!-- AOT compatibility is not needed in the CI pipeline, so override the value set in Directory.Build.props to use reflections freely -->
<IsAotCompatible>false</IsAotCompatible>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 50b0fd8

Please sign in to comment.