Skip to content

Commit 22421f2

Browse files
committed
No .deps.json for net472 Container task
MSBuild only respects a .deps.json in the net8.0 engine, so there's no need to create it for a net472 task. It includes references that aren't part of the SDK, like the downlevel `System.Text.Json` that is provided by MSBuild/Visual Studio, so removing it can avoid false positives from dependency scanners.
1 parent cf4b8ca commit 22421f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Containers/Microsoft.NET.Build.Containers/Microsoft.NET.Build.Containers.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage
1010
</TargetsForTfmSpecificBuildOutput>
1111

12-
<!-- Tell the SDK to generate a deps.json file -->
13-
<GenerateDependencyFile>true</GenerateDependencyFile>
12+
<!-- Tell the SDK to generate a deps.json file to be used by .NET SDK MSBuild -->
13+
<GenerateDependencyFile Condition=" '$(TargetFramework)' != 'net472'">true</GenerateDependencyFile>
1414

1515
<!-- Allow the packaging project to use the name `Microsoft.NET.Build.Containers` for the nuget package -->
1616
<Packageid>.</Packageid>

0 commit comments

Comments
 (0)