Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/NuGetizer.Tasks/NuGetizer.Inference.targets
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<PackagePathHasFilename Condition="$([MSBuild]::ValueOrDefault('%(PackagePath)', '').EndsWith('%(PackageFile)'))"></PackagePathHasFilename>
</TfmSpecificPackageFile>
<TfmSpecificPackageFile Condition="'%(PackagePathHasFilename)' == 'false'">
<PackagePath>$([MSBuild]::ValueOrDefault('%(PackagePath)', '').TrimEnd('/'))/%(PackageFile)</PackagePath>
<PackagePath>$([MSBuild]::ValueOrDefault('%(PackagePath)', '').TrimEnd('/'))/%(RecursiveDir)%(PackageFile)</PackagePath>
</TfmSpecificPackageFile>
<None Include="@(TfmSpecificPackageFile)" />

Expand Down
21 changes: 21 additions & 0 deletions src/NuGetizer.Tests/given_a_tool_project.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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(@"
<Project Sdk='Microsoft.NET.Sdk'>
<PropertyGroup>
<AssemblyName>MyTool</AssemblyName>
<PackageId>MyTool</PackageId>
<TargetFramework>net8.0</TargetFramework>
<PackFolder>tools</PackFolder>
<PackAsTool>true</PackAsTool>
</PropertyGroup>
<ItemGroup>
<PackageReference Include='Spectre.Console.Cli' Version='0.51.1' />
</ItemGroup>
</Project>",
"Pack", output);

result.AssertSuccess(output);
}

[Fact]
public void when_pack_folder_tool_but_no_pack_as_tool_then_packs_dependencies_normally()
{
Expand Down
Loading