Skip to content

Commit 18aad58

Browse files
committed
Add AoT compatibility MSBuild property
1 parent 94258c9 commit 18aad58

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

.csharpierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bin/
2+
obj/

samples/basic/ConsoleAOT/ConsoleAOT.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<OutputType>Exe</OutputType>
44
<TargetFramework>net8.0</TargetFramework>
55
<PublishAot>true</PublishAot>
6+
<IsAotCompatible>true</IsAotCompatible>
67
<!-- Tells the compiler to emit the code generated by Mediator.SourceGenerator as files in the project -->
78
<!-- This is useful for debugging purposes -->
89
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>

src/Mediator/Mediator.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
</Description>
99
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1010
</PropertyGroup>
11+
<PropertyGroup Condition="'$(TargetFramework)' != 'netstandard2.0'">
12+
<IsAotCompatible>true</IsAotCompatible>
13+
</PropertyGroup>
1114
<Target Name="husky" BeforeTargets="Restore;CollectPackageReferences" Condition="'$(HUSKY)' != 0">
1215
<Exec Command="dotnet tool restore" StandardOutputImportance="Low" StandardErrorImportance="High" />
1316
<Exec

0 commit comments

Comments
 (0)