如何在 Visual Studio 2017 项目(新的 .csproj 文件格式)中设置“OutputPath”,而不会使目标框架扰乱解析的路径?

2024-04-30

Setting OutputPath在新的 Visual Studio 2017 项目格式中,会自动在路径中添加目标框架。例如,如果我在项目文件中设置了这些:

<TargetFramework>net462</TargetFramework>
<OutputPath>/build/debug/<OutputPath>

实际的输出文件夹将解析为/build/debug/net462/, not /build/debug/就像旧版本一样。 如果没有诸如通过构建后操作移动内容之类的解决方法,我该如何解决这个问题?


解决方案是使用AppendTargetFrameworkToOutputPath https://www.tabsoverspaces.com/233608-stopping-msbuild-appending-targetframework-to-outputpath/ https://www.tabsoverspaces.com/233608-stopping-msbuild-appending-targetframework-to-outputpath/

<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何在 Visual Studio 2017 项目(新的 .csproj 文件格式)中设置“OutputPath”,而不会使目标框架扰乱解析的路径? 的相关文章

随机推荐