Skip to content

Commit 43e1105

Browse files
gfraiteurclaude
andcommitted
Fix dotnet tool-manifest creation with explicit --output flag
When a tool manifest exists in a parent directory, dotnet new tool-manifest skips creation without error. Use --output to explicitly specify the target directory so the manifest is always created where expected. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent ce78eff commit 43e1105

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/PostSharp.Engineering.BuildTools/Utilities/DotNetTool.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,12 @@ public bool Install( BuildContext context )
6969
// 1. Create the dotnet tool manifest.
7070
if ( !File.Exists( configFilePath ) )
7171
{
72+
// Use --output to explicitly specify where to create the manifest.
73+
// Without this, dotnet will skip creation if a manifest exists in a parent directory.
7274
if ( !ToolInvocationHelper.InvokeTool(
7375
context.Console,
7476
"dotnet",
75-
$"new tool-manifest",
77+
$"new tool-manifest --output \"{baseDirectory}\"",
7678
baseDirectory ) )
7779
{
7880
return false;

0 commit comments

Comments
 (0)