Skip to content

Commit

Permalink
Force NullabilityInfoContextSupport=true in user projects
Browse files Browse the repository at this point in the history
To make NRT-based model building work correctly in aggressively
trimmed applications (e.g. MAUI).

Fixes dotnet#27474
  • Loading branch information
roji committed Apr 29, 2022
1 parent 5e49b24 commit 5a579a0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/EFCore/EFCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ Microsoft.EntityFrameworkCore.DbSet
<ProjectReference Condition="'$(BuildingByReSharper)' != 'true'" Include="..\EFCore.Analyzers\EFCore.Analyzers.csproj" PrivateAssets="contentfiles;build" />
</ItemGroup>

<ItemGroup>
<None Include="build\**\*">
<Pack>True</Pack>
<PackagePath>build</PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<None Update="Properties\CoreStrings.Designer.tt">
<Generator>TextTemplatingFileGenerator</Generator>
Expand Down
5 changes: 5 additions & 0 deletions src/EFCore/build/net6.0/Microsoft.EntityFrameworkCore.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<NullabilityInfoContextSupport>true</NullabilityInfoContextSupport>
</PropertyGroup>
</Project>

0 comments on commit 5a579a0

Please sign in to comment.