diff --git a/src/NuGetizer.Tasks/NuGetizer.Inference.targets b/src/NuGetizer.Tasks/NuGetizer.Inference.targets index 20d2546d..4fa6164b 100644 --- a/src/NuGetizer.Tasks/NuGetizer.Inference.targets +++ b/src/NuGetizer.Tasks/NuGetizer.Inference.targets @@ -276,7 +276,7 @@ Copyright (c) .NET Foundation. All rights reserved. - $([MSBuild]::ValueOrDefault('%(PackagePath)', '').TrimEnd('/'))/%(PackageFile) + $([MSBuild]::ValueOrDefault('%(PackagePath)', '').TrimEnd('/'))/%(RecursiveDir)%(PackageFile) diff --git a/src/NuGetizer.Tests/given_a_tool_project.cs b/src/NuGetizer.Tests/given_a_tool_project.cs index 498f8447..7cbcd58f 100644 --- a/src/NuGetizer.Tests/given_a_tool_project.cs +++ b/src/NuGetizer.Tests/given_a_tool_project.cs @@ -90,6 +90,27 @@ public void when_pack_as_tool_then_packs_dotnet_tool_runtime_assets() })); } + [Fact] + public void when_pack_as_tool_with_localized_resources_then_packs_dotnet_tool_runtime_assets() + { + var result = Builder.BuildProject(@" + + + MyTool + MyTool + net8.0 + tools + true + + + + +", + "Pack", output); + + result.AssertSuccess(output); + } + [Fact] public void when_pack_folder_tool_but_no_pack_as_tool_then_packs_dependencies_normally() {