禁用 ASP.NET Core 输出路径中的“RuntimeIdentifier”子文件夹

t3c*_*b0t 4 c# msbuild asp.net-core visual-studio-2017

ASP.NET Core 项目创建了许多子目录,例如:

bin\Debug\ne47\win81-x64
Run Code Online (Sandbox Code Playgroud)

我发现其中一个可以用秘密 禁用,AppendTargetFrameworkToOutputPath我现在有:

bin\Debug\win81-x64
Run Code Online (Sandbox Code Playgroud)

但我希望它只是旧的

bin\Debug
Run Code Online (Sandbox Code Playgroud)

所以我试图在docs.microsoft.com 中找到类似的东西,但甚至没有第一个选项。

为什么这如此秘密以至于无处记录?其他子目录也有这样的选项吗?

我想这是来自

<RuntimeIdentifier>win81-x64</RuntimeIdentifier>
Run Code Online (Sandbox Code Playgroud)

但为什么?我没有要求。

Leo*_*SFT 8

禁用 ASP.NET Core 输出路径中的“RuntimeIdentifier”子文件夹

您可以通过设置禁用此行为:

<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
Run Code Online (Sandbox Code Playgroud)

此行为来自.NET Core RID Catalog

希望这可以帮助。