如何在Visual Studio 2017项目(新的.csproj文件格式)中设置`OutputPath`,而目标框架不会使解析路径混乱? [英] How do I set `OutputPath` in a Visual Studio 2017 project (new .csproj file format) without the target framework cluttering the resolved path?
本文介绍了如何在Visual Studio 2017项目(新的.csproj文件格式)中设置`OutputPath`,而目标框架不会使解析路径混乱?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以新的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
查看全文