Skip to content

Commit b28afc5

Browse files
Copilotlbussell
andcommitted
Add Nullable enable to ImageBuilder projects for Docker build compatibility
ImageBuilder projects need explicit <Nullable>enable</Nullable> in their .csproj files because the Dockerfile builds from src/ context and won't see the root Directory.Build.props. Co-authored-by: lbussell <36081148+lbussell@users.noreply.github.com>
1 parent 844eb57 commit b28afc5

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

src/ImageBuilder.Models/Microsoft.DotNet.ImageBuilder.Models.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup Label="Project Settings">
44
<TargetFramework>net9.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
67
</PropertyGroup>
78

89
<PropertyGroup Label="Build Settings">

src/ImageBuilder.Tests/Microsoft.DotNet.ImageBuilder.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<IsPackable>false</IsPackable>
66
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
77
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
8+
<Nullable>enable</Nullable>
89
</PropertyGroup>
910

1011
<PropertyGroup>

src/ImageBuilder/Microsoft.DotNet.ImageBuilder.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<RootNamespace>Microsoft.DotNet.ImageBuilder</RootNamespace>
88
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
99
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
10+
<Nullable>enable</Nullable>
1011
</PropertyGroup>
1112

1213
<PropertyGroup>

0 commit comments

Comments
 (0)