/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Installers/Windows/Wix.targets
135 строк
8 KB
dotnet-maestro[bot]
[main] Source code updates from dotnet/dotnet (#68090)
29 июл 2026, 22:04
Не верифицирован
29 июл 2026, 22:04
2e05e26
Код
Авторство
О чём код?
<Project> <!-- Set versioning properties after Arcade SDK targets have been imported. --> <PropertyGroup> <!-- Actual upgrade code used in bundles to ensure upgrades within a version band, e.g. 3.0.0.xxx --> <_FileRevisionVersion>$(VersionSuffixDateStamp)</_FileRevisionVersion> <_FileRevisionVersion Condition=" '$(_FileRevisionVersion)' == '' ">42424</_FileRevisionVersion> <BundleVersion Condition="'$(BundleVersion)' != ''" >$(BundleVersion).$(_FileRevisionVersion)</BundleVersion> <BundleVersion Condition="'$(BundleVersion)' == ''" >$(AspNetCoreMajorMinorVersion).$(AspNetCorePatchVersion).$(_FileRevisionVersion)</BundleVersion> <!-- Used for generating stable upgrade codes for bundles --> <Version>$(BundleVersion)</Version> <!-- ARM64 MSIs require the installer version to be at least 500. --> <!-- See: https://learn.microsoft.com/windows/win32/msi/64-bit-windows-installer-packages --> <DefineConstants Condition=" '$(Platform)' == 'arm64' ">$(DefineConstants);InstallerVersion=500</DefineConstants> <DefineConstants Condition=" '$(Platform)' != 'arm64' ">$(DefineConstants);InstallerVersion=200</DefineConstants> <DefineConstants>$(DefineConstants);MajorVersion=$(AspNetCoreMajorVersion)</DefineConstants> <DefineConstants>$(DefineConstants);MinorVersion=$(AspNetCoreMinorVersion)</DefineConstants> <DefineConstants>$(DefineConstants);Version=$(Version)</DefineConstants> <DefineConstants>$(DefineConstants);PackageVersion=$(PackageVersion)</DefineConstants> </PropertyGroup> <PropertyGroup Condition="'$(OutputType)' == 'package'"> <InstallDir>$(ProductName)</InstallDir> <DepProviderKey>Microsoft.$(ProductNameShort)_$(Platform)_$(Lang),v$(_GeneratedPackageVersion)</DepProviderKey> <DefineConstants>$(DefineConstants);DepProviderKey=$(DepProviderKey)</DefineConstants> <!-- Everything built in those projects _except_ the final package & MSI are shipping assets. --> <_GeneratedPackageVersion>$(PackageVersion)</_GeneratedPackageVersion> <_GeneratedPackageVersion Condition="! $(PackageVersion.Contains('$(_BuildNumberLabels)'))">$(VersionPrefix)-$(_PreReleaseLabel)$(_BuildNumberLabels)</_GeneratedPackageVersion> </PropertyGroup> <PropertyGroup> <GuidInputs>$(Version);$(Platform);$(VersionSuffix)</GuidInputs> </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.DotNet.Build.Tasks.Installers" Version="$(MicrosoftDotNetBuildTasksInstallersVersion)" /> </ItemGroup> <Target Name="GenerateGUIDs" BeforeTargets="BeforeBuild" DependsOnTargets="_GeneratePackageGuids;_GenerateBundleGuids" Condition=" '$(DisableGuidGeneration)' != 'true' " /> <Target Name="_GeneratePackageGuids" Condition="'$(OutputType)' == 'package'"> <GenerateGuid Condition="'$(ProductNameShort)' != '$(HostOptionsNameShort)'" NamespaceGuid="$(NamespaceGuid)" Values="$(ProductNameShort);$(GuidInputs)"> <Output TaskParameter="Guid" PropertyName="ProductCode" /> </GenerateGuid> <GenerateGuid Condition="'$(ProductNameShort)' != '$(HostOptionsNameShort)'" NamespaceGuid="$(NamespaceGuid)" Values="$(ProductNameShort);$(GuidInputs);$(OutputType)"> <Output TaskParameter="Guid" PropertyName="UpgradeCode" /> </GenerateGuid> <GenerateGuid Condition="'$(ProductNameShort)' == '$(HostOptionsNameShort)'" NamespaceGuid="$(NamespaceGuid)" Values="$(ProductNameShort);$(Version)"> <Output TaskParameter="Guid" PropertyName="ProductCode" /> </GenerateGuid> <GenerateGuid Condition="'$(ProductNameShort)' == '$(HostOptionsNameShort)'" NamespaceGuid="$(NamespaceGuid)" Values="$(ProductNameShort);$(AspNetCoreMajorMinorVersion);$(OutputType)"> <Output TaskParameter="Guid" PropertyName="UpgradeCode" /> </GenerateGuid> <PropertyGroup> <DefineConstants>$(DefineConstants);ProductCode=$(ProductCode);UpgradeCode=$(UpgradeCode)</DefineConstants> </PropertyGroup> </Target> <Target Name="_GenerateBundleGuids" Condition="'$(OutputType)' == 'bundle'"> <!-- Don't need to use the name of the bundle since we have separate namespace GUIDs. The name will also changes based on the milestone and destabalize the upgrade code. Bundle upgrades pivot on Major.Minor.Patch changes. For example, 3.0.1-preview 1 can upgrade to 3.0.1-preview 8, but 3.0.1 cannot upgrade to 3.0.2 or 3.1. --> <PropertyGroup> <BundleGuidInputs>$(AspNetCoreMajorMinorVersion);$(Platform)</BundleGuidInputs> </PropertyGroup> <GenerateGuid NamespaceGuid="$(NamespaceGuid)" Values="$(BundleGuidInputs)"> <Output TaskParameter="Guid" PropertyName="BundleProviderKey" /> </GenerateGuid> <GenerateGuid NamespaceGuid="$(NamespaceGuid)" Values="$(BundleGuidInputs)"> <Output TaskParameter="Guid" PropertyName="BundleUpgradeCode" /> </GenerateGuid> <PropertyGroup> <DefineConstants>$(DefineConstants);BundleVersion=$(BundleVersion);BundleProviderKey=$(BundleProviderKey);BundleUpgradeCode=$(BundleUpgradeCode)</DefineConstants> </PropertyGroup> </Target> <Target Name="_CheckPackageFileNameIsSet" BeforeTargets="PrepareForBuild"> <Error Text="Missing required property: PackageFileName" Condition="'$(PackageFileName)' == ''" /> </Target> <Target Name="CopyToArtifactsDirectory" Condition=" '$(IsShipping)' == 'true' AND '$(SkipCopyToArtifactsDirectory)' != 'true' " BeforeTargets="Build"> <Copy SourceFiles="$(TargetPath)" DestinationFiles="$(InstallersOutputPath)$(PackageFileName)" /> <ItemGroup> <_cabs Include="$(TargetDir)**/*.cab" /> </ItemGroup> <Copy SourceFiles="@(_cabs)" DestinationFolder="$(InstallersOutputPath)" /> </Target> <!-- This target can be used to set additional Wix options. --> <Target Name="SetAdditionalWixOptions" BeforeTargets="CoreCompile"> <PropertyGroup> <!-- Use backwards compatible GUID generation. --> <CompilerAdditionalOptions>$(CompilerAdditionalOptions) -bcgg</CompilerAdditionalOptions> </PropertyGroup> </Target> <Target Name="GenerateWixpackPackage" AfterTargets="CoreCompile"> <PropertyGroup> <WixpackWorkingDir>$(IntermediateOutputPath)wixpack</WixpackWorkingDir> <WixpackOutputDir>$(ArtifactsNonShippingPackagesDir)</WixpackOutputDir> </PropertyGroup> <CreateWixBuildWixpack AdditionalOptions="$(CompilerAdditionalOptions) $(LinkerAdditionalOptions)" BindTrackingFile="$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.OutputSuffix)$(BindTrackingFileExtension)" Cultures="%(CultureGroup.Identity)" DefineConstants="$(DefineConstants);$(SolutionDefineConstants);$(ProjectDefineConstants);$(ProjectReferenceDefineConstants)" Extensions="@(_ResolvedWixExtensionPaths)" InstallerPlatform="$(InstallerPlatform)" InstallerFile="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(TargetFileName)" IntermediateDirectory="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)" OutputFolder="$(WixpackOutputDir)" OutputType="$(OutputType)" PdbFile="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(TargetPdbFileName)" PdbType="$(DebugType)" SourceFiles="@(Compile)" SuppressSpecificWarnings="$(SuppressSpecificWarnings)" LocalizationFiles="@(_WixLocalizationFile)" BindPaths="@(BindPath)" WixpackWorkingDir="$(WixpackWorkingDir)"> <Output TaskParameter="OutputFile" PropertyName="_WixBuildCommandPackageNameOutput" /> </CreateWixBuildWixpack> </Target> <!-- wixprojs don't do any packaging but the target is called from Arcade's Build.proj. --> <Target Name="Pack" /> </Project>