t3chb0t
t3chb0t

Reputation: 18685

Disable 'RuntimeIdentifier' subfolder in ASP.NET Core output path

ASP.NET Core projects create many subdirectories like:

bin\Debug\ne47\win81-x64

I found that one of them can be disabled with the secret AppendTargetFrameworkToOutputPath and I now have:

bin\Debug\win81-x64

but I'd like it to just be the old

bin\Debug

so I tried to find something similar in learn.microsoft.com but there is not even the first option.

Why is this so secret that it's nowhere documented? Is there such an option for the other subdirectory too?

I guess this is comming from the

<RuntimeIdentifier>win81-x64</RuntimeIdentifier>

but why? I didn't ask for it.

Upvotes: 11

Views: 5530

Answers (1)

Leo Liu
Leo Liu

Reputation: 76870

Disable 'RuntimeIdentifier' subfolder in ASP.NET Core output path

You can disable this behavior by setting:

<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>

This behavior comes from the .NET Core RID Catalog. Official documentation is available in the MSBuild reference for .NET SDK projects.

Hope this helps.

Upvotes: 18

Related Questions