diff --git a/src/NuGetizer.Tasks/NuGetizer.Inference.targets b/src/NuGetizer.Tasks/NuGetizer.Inference.targets
index c9cc0b2a..c6a90d98 100644
--- a/src/NuGetizer.Tasks/NuGetizer.Inference.targets
+++ b/src/NuGetizer.Tasks/NuGetizer.Inference.targets
@@ -401,8 +401,8 @@ Copyright (c) .NET Foundation. All rights reserved.
'$(PackAsPublish)' != 'true' and
'%(PackageReference.Identity)' != 'NuGetizer' and
'%(PackageReference.Identity)' != 'NETStandard.Library' and
- '%(PackageReference.PrivateAssets)' != 'all' and
- '%(PackageReference.Pack)' != 'false'">
+ '%(PackageReference.Pack)' != 'false' and
+ ('%(PackageReference.PrivateAssets)' != 'all' or '%(PackageReference.Pack)' == 'true')">
Dependency
diff --git a/src/NuGetizer.Tests/InlineProjectTests.cs b/src/NuGetizer.Tests/InlineProjectTests.cs
index 670652a8..362265c9 100644
--- a/src/NuGetizer.Tests/InlineProjectTests.cs
+++ b/src/NuGetizer.Tests/InlineProjectTests.cs
@@ -1053,5 +1053,32 @@ public void when_packagepath_ends_in_path_then_packs_basedir_dir()
PackagePath = "assets/screen.png",
}));
}
+
+ [Fact]
+ public void when_dependency_is_development_dependency_then_can_explicitly_pack_it()
+ {
+ var result = Builder.BuildProject(
+ """
+
+
+ netstandard2.0
+ true
+
+
+
+
+
+ """
+ , "GetPackageContents", output);
+
+ result.AssertSuccess(output);
+
+ Assert.Contains(result.Items, item => item.Matches(new
+ {
+ Identity = "ThisAssembly.Constants",
+ PackFolder = "Dependency",
+ }));
+ }
+
}
}