diff --git a/src/NuGetizer.Tasks/NuGetizer.Inference.targets b/src/NuGetizer.Tasks/NuGetizer.Inference.targets
index 0f62c94a..fa20d07e 100644
--- a/src/NuGetizer.Tasks/NuGetizer.Inference.targets
+++ b/src/NuGetizer.Tasks/NuGetizer.Inference.targets
@@ -14,6 +14,9 @@ Copyright (c) .NET Foundation. All rights reserved.
+
+ true
+
lib
diff --git a/src/NuGetizer.Tests/given_a_tool_project.cs b/src/NuGetizer.Tests/given_a_tool_project.cs
index 57861bd9..498f8447 100644
--- a/src/NuGetizer.Tests/given_a_tool_project.cs
+++ b/src/NuGetizer.Tests/given_a_tool_project.cs
@@ -37,6 +37,33 @@ public void when_pack_as_tool_then_packs_no_dependencies()
}));
}
+ [Fact]
+ public void when_toolcommand_then_packs_as_tool_with_no_dependencies()
+ {
+ var result = Builder.BuildProject(@"
+
+
+ MyTool
+ net8.0
+ mycommand
+
+
+
+
+",
+ "GetPackageContents", output);
+
+ result.AssertSuccess(output);
+ Assert.DoesNotContain(result.Items, item => item.Matches(new
+ {
+ Identity = "Microsoft.Extensions.DependencyModel"
+ }));
+ Assert.Contains(result.Items, item => item.Matches(new
+ {
+ PackageFile = "Microsoft.Extensions.DependencyModel.dll"
+ }));
+ }
+
[Fact]
public void when_pack_as_tool_then_packs_dotnet_tool_runtime_assets()
{