参考:
Common MSBuild Project Properties - MSBuild | Microsoft Learn
目前看来,二者都指定输出地址。
前者会添加当前项目的配置属性:

后者:
-
直接使用指定的路径作为输出目录
-
不会添加额外的配置(Debug/Release)和框架(net461\.Net 2...)子目录
远程调试时想把exe直接输出到远程计算机上,可以这样设置:
XML
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net461</TargetFramework>
<UseWPF>true</UseWPF>
<LangVersion>11.0</LangVersion>
<SignAssembly>false</SignAssembly>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Version>1.4.0</Version>
<ApplicationIcon>Resource\Image\burger.ico</ApplicationIcon>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!--<OutputPath Condition="'$(Configuration)'=='Debug'">\bin\Output\</OutputPath>
<OutputPath Condition="'$(Configuration)'=='远程'">\\DESKTOP-V21FG2T\Share\FluentVision\bin\Output\远程\</OutputPath>-->
<!--<OutputPath>bin\Output\</OutputPath>-->
<OutputPath>\\DESKTOP-V21FG2T\Share\FluentVision\bin\Output\远程\net461</OutputPath>
<!--<BaseOutputPath>\\DESKTOP-V21FG2T\Share\FluentVision\bin\Output</BaseOutputPath>-->
<PackAsTool>False</PackAsTool>
<PackageOutputPath>\\DESKTOP-V21FG2T\Share\FluentVision\bin\Output</PackageOutputPath>
<PlatformTarget>x64</PlatformTarget>
<Configurations>Debug;Release;远程</Configurations>
</PropertyGroup>
还没研究明白区别到底在哪里,可以多试试,Baseoutputpath/Outputpath都尝试设置一遍然后查看输出是否成功;
AppendTargetFrameworkToOutputPath:
为false时:

为true时:

多了一层框架名称文件夹。
未完