問題描述
在新的 Visual Studio 2017 項目格式中設置 OutputPath
會自動在路徑中添加目標框架.例如,如果我在項目文件中設置了這些:
Setting OutputPath
in the new Visual Studio 2017 project format automatically adds the target framework in the path. For example, if I have these set in the project file:
<TargetFramework>net462</TargetFramework>
<OutputPath>/build/debug/<OutputPath>
實際的輸出文件夾將解析為 /build/debug/net462/
,而不是像舊版本中的 /build/debug/
.如果沒有使用構建后操作移動東西等變通方法,我該如何解決這個問題?
The actual output folder will resolve to /build/debug/net462/
, not /build/debug/
like in the older versions.
How do I solve this without workarounds like moving things around with post build actions?
推薦答案
解決方案是使用 AppendTargetFrameworkToOutputPath
https://www.tabsoverspaces.com/233608-stopping-msbuild-appending-targetframework-to-outputpath/
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
這篇關于如何在 Visual Studio 2017 項目(新的 .csproj 文件格式)中設置“OutputPath",而目標框架不會弄亂解析的路徑?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!