更新
更旧
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(DefaultNetCoreTargetFramework)</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net472</TargetFrameworks>
<DefineConstants Condition="'$(TargetFramework)' == 'net472'">$(DefineConstants);BUILD_MSI_TASKS</DefineConstants>
<Optimize>false</Optimize>
<DebugType>embedded</DebugType>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<!-- Need to build this project in source build -->
<ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
<!-- Temporarily target the previous runtime until https://github.com/dotnet/sdk/pull/14574 is merged. -->
<TargetLatestDotNetRuntime>false</TargetLatestDotNetRuntime>
<!-- No need to track public APIs of these MSBuild tasks. -->
<AddPublicApiAnalyzers>false</AddPublicApiAnalyzers>
<PackageReference Include="NuGet.Packaging" Version="$(NuGetPackagingVersion)" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="$(MicrosoftExtensionsDependencyModelVersion)" />
<ItemGroup Condition="'$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)'">
<PackageReference Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildFrameworkVersion)" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildTaskCoreVersion)" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildUtilitiesCoreVersion)" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
<PackageReference Include="Wix" Version="3.11.1" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<Reference Include="Microsoft.Build" />
<Reference Include="Microsoft.Build.Framework" />
<Reference Include="Microsoft.Build.Tasks.v4.0" />
<Reference Include="Microsoft.Build.Utilities.v4.0" />
<Reference Include="Microsoft.Deployment.WindowsInstaller">
<HintPath>$(WiXSdkPath)\Microsoft.Deployment.WindowsInstaller.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Deployment.WindowsInstaller.Package">
<HintPath>$(WiXSdkPath)\Microsoft.Deployment.WindowsInstaller.Package.dll</HintPath>
</Reference>
</ItemGroup>
</Project>