Skip to content

Commit

Permalink
Add Windows DevVersions VMR build leg (#44387)
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorHofer authored Oct 23, 2024
1 parent 71936e9 commit 49c50d2
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 39 deletions.
13 changes: 13 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,18 @@
<Using Include="System.Xml.Linq" />
</ItemGroup>

<!-- These aliases need to live outside of Versions.props as VMR / source-build overwrites some of the version properties for live builds. -->
<PropertyGroup>
<!-- Runtime and Apphost pack versions are the same for all RIDs. We flow the x64 version above and create aliases without the winx64 here for clarity elsewhere. -->
<MicrosoftNETCoreAppHostPackageVersion>$(MicrosoftNETCoreAppHostwinx64PackageVersion)</MicrosoftNETCoreAppHostPackageVersion>
<MicrosoftNETCoreAppRuntimePackageVersion>$(MicrosoftNETCoreAppRuntimewinx64PackageVersion)</MicrosoftNETCoreAppRuntimePackageVersion>
<MicrosoftAspNetCoreAppRuntimePackageVersion>$(MicrosoftAspNetCoreAppRuntimewinx64PackageVersion)</MicrosoftAspNetCoreAppRuntimePackageVersion>
<MicrosoftWindowsDesktopAppRuntimePackageVersion>$(MicrosoftWindowsDesktopAppRuntimewinx64PackageVersion)</MicrosoftWindowsDesktopAppRuntimePackageVersion>

<HostFxrVersion>$(MicrosoftNETCoreAppRuntimePackageVersion)</HostFxrVersion>
<SharedHostVersion>$(MicrosoftNETCoreAppRuntimePackageVersion)</SharedHostVersion>
</PropertyGroup>

<Import Project="build/GenerateResxSource.targets" />

</Project>
14 changes: 2 additions & 12 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
<!-- These are minimum versions used for netfx-targeted components that run in Visual Studio because in those cases,
Visual Studio is providing those assemblies, and we should work with whichever version it ships. -->
<MicrosoftBclAsyncInterfacesToolsetPackageVersion>8.0.0</MicrosoftBclAsyncInterfacesToolsetPackageVersion>
<MicrosoftDeploymentDotNetReleasesToolsetPackageVersion>2.0.0-preview.1.24427.4</MicrosoftDeploymentDotNetReleasesToolsetPackageVersion>
<SystemCollectionsImmutableToolsetPackageVersion>8.0.0</SystemCollectionsImmutableToolsetPackageVersion>
<SystemReflectionMetadataLoadContextToolsetPackageVersion>8.0.0</SystemReflectionMetadataLoadContextToolsetPackageVersion>
<SystemReflectionMetadataToolsetPackageVersion>8.0.0</SystemReflectionMetadataToolsetPackageVersion>
Expand Down Expand Up @@ -278,20 +279,9 @@
<MicrosoftNETSdkWindowsDesktopPackageVersion>10.0.0-alpha.1.24521.5</MicrosoftNETSdkWindowsDesktopPackageVersion>
<MicrosoftDotNetWpfProjectTemplatesPackageVersion>10.0.0-alpha.1.24521.5</MicrosoftDotNetWpfProjectTemplatesPackageVersion>
</PropertyGroup>
<PropertyGroup Label="Runtime and Apphost aliases">
<!-- Runtime and Apphost pack versions are the same for all RIDs. We flow the x64 version above and create aliases without the winx64 here for clarity elsewhere. -->
<MicrosoftNETCoreAppHostPackageVersion>$(MicrosoftNETCoreAppHostwinx64PackageVersion)</MicrosoftNETCoreAppHostPackageVersion>
<MicrosoftNETCoreAppRuntimePackageVersion>$(MicrosoftNETCoreAppRuntimewinx64PackageVersion)</MicrosoftNETCoreAppRuntimePackageVersion>
<MicrosoftAspNetCoreAppRuntimePackageVersion>$(MicrosoftAspNetCoreAppRuntimewinx64PackageVersion)</MicrosoftAspNetCoreAppRuntimePackageVersion>
<MicrosoftWindowsDesktopAppRuntimePackageVersion>$(MicrosoftWindowsDesktopAppRuntimewinx64PackageVersion)</MicrosoftWindowsDesktopAppRuntimePackageVersion>
</PropertyGroup>
<PropertyGroup Label="HostFxr and SharedHost versions">
<HostFxrVersion>$(MicrosoftNETCoreAppRuntimePackageVersion)</HostFxrVersion>
<SharedHostVersion>$(MicrosoftNETCoreAppRuntimePackageVersion)</SharedHostVersion>
</PropertyGroup>
<PropertyGroup Label="Template versions">
<!-- 10.0 Template versions -->
<AspNetCorePackageVersionFor100Templates>$(MicrosoftAspNetCoreAppRuntimePackageVersion)</AspNetCorePackageVersionFor100Templates>
<AspNetCorePackageVersionFor100Templates>$(MicrosoftAspNetCoreAppRuntimewinx64PackageVersion)</AspNetCorePackageVersionFor100Templates>
<MicrosoftDotnetWinFormsProjectTemplates100PackageVersion>$(MicrosoftDotnetWinFormsProjectTemplatesPackageVersion)</MicrosoftDotnetWinFormsProjectTemplates100PackageVersion>
<MicrosoftDotNetWpfProjectTemplates100PackageVersion>$(MicrosoftDotNetWpfProjectTemplatesPackageVersion)</MicrosoftDotNetWpfProjectTemplates100PackageVersion>
<!-- 9.0 Template versions -->
Expand Down
12 changes: 12 additions & 0 deletions eng/pipelines/templates/stages/vmr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,18 @@ stages:
targetOS: linux
targetArchitecture: x64

- template: ../jobs/vmr-build.yml
parameters:
buildName: Windows_DevVersions
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
architecture: x64
pool: ${{ parameters.pool_Windows }}
targetOS: windows
targetArchitecture: x64
useDevVersions: true # Use dev versions for CI validation of the experience. If we decide to ship assets from this leg, then we should remove this option.
runTests: false # Temporarily do not run tests. The nuget comparison fails for some non-obvious reason and needs further investigation. Mostly, I'm not sure why it ever passed. https://github.com/dotnet/sdk/issues/42920

- template: ../jobs/vmr-build.yml
parameters:
buildName: Windows
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<!-- SdkResolver -->
<ItemGroup>
<PackageDownload Include="Microsoft.Deployment.DotNet.Releases" Version="[$(MicrosoftDeploymentDotNetReleasesVersion)]" />
<PackageDownload Include="Microsoft.Deployment.DotNet.Releases" Version="[$(MicrosoftDeploymentDotNetReleasesToolsetPackageVersion)]" />
<PackageDownload Include="Microsoft.NETCore.App.Runtime.win-x86" Version="[$(MicrosoftNETCoreAppRuntimePackageVersion)]" />
<PackageDownload Include="Microsoft.NETCore.App.Runtime.win-x64" Version="[$(MicrosoftNETCoreAppRuntimePackageVersion)]" />
<PackageDownload Include="Microsoft.NETCore.App.Runtime.win-arm64" Version="[$(MicrosoftNETCoreAppRuntimePackageVersion)]" />
Expand Down Expand Up @@ -65,7 +65,7 @@
DeploymentSubpath="msbuildExtensions/Microsoft/Microsoft.NET.Build.Extensions/" />

<!-- SdkResolver -->
<VSMSBuildExtensionsContent Include="$(NuGetPackageRoot)microsoft.deployment.dotNet.releases\$(MicrosoftDeploymentDotNetReleasesVersion)\lib\netstandard2.0\**\*.*" DeploymentSubpath="MSBuildSdkResolver/" />
<VSMSBuildExtensionsContent Include="$(NuGetPackageRoot)microsoft.deployment.dotNet.releases\$(MicrosoftDeploymentDotNetReleasesToolsetPackageVersion)\lib\netstandard2.0\**\*.*" DeploymentSubpath="MSBuildSdkResolver/" />
<VSMSBuildExtensionsContent Include="$(NuGetPackageRoot)microsoft.netcore.app.runtime.win-x86\$(MicrosoftNETCoreAppRuntimePackageVersion)\runtimes\win-x86\native\hostfxr.dll" DeploymentSubpath="MSBuildSdkResolver/x86/" />
<VSMSBuildExtensionsContent Include="$(NuGetPackageRoot)microsoft.netcore.app.runtime.win-x64\$(MicrosoftNETCoreAppRuntimePackageVersion)\runtimes\win-x64\native\hostfxr.dll" DeploymentSubpath="MSBuildSdkResolver/x64/" />
<VSMSBuildExtensionsContent Include="$(NuGetPackageRoot)microsoft.netcore.app.runtime.win-arm64\$(MicrosoftNETCoreAppRuntimePackageVersion)\runtimes\win-arm64\native\hostfxr.dll" DeploymentSubpath="MSBuildSdkResolver/arm64/" />
Expand Down
27 changes: 11 additions & 16 deletions src/Installer/redist-installer/targets/GenerateLayout.targets
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@
<NetStandardTargetingPackRootUrl>$(OfficialBaseURL)Runtime/$(NETStandardTargetingPackBlobVersion)</NetStandardTargetingPackRootUrl>

<AspNetCoreSharedFxRootUrl>$(PublicBaseURL)aspnetcore/Runtime/$(AspNetCoreBlobVersion)</AspNetCoreSharedFxRootUrl>
<!-- Aspnet is not currently built in the VMR. Remove this line when https://github.com/dotnet/source-build/issues/4022 is complete. -->
<AspNetCoreSharedFxRootUrl Condition=" '$(DotNetBuildOrchestrator)' == 'true' and '$(DotNetBuildSourceOnly)' != 'true'">$(FallbackPublicBaseURL)aspnetcore/Runtime/$(AspNetCoreBlobVersion)</AspNetCoreSharedFxRootUrl>

<WinFormsAndWpfSharedFxRootUrl>$(PublicBaseURL)WindowsDesktop/$(WindowsDesktopBlobVersion)</WinFormsAndWpfSharedFxRootUrl>

Expand Down Expand Up @@ -167,21 +165,23 @@
<RelativeLayoutPath>packs/%(PackageName)/%(PackageVersion)</RelativeLayoutPath>
</BundledLayoutPackage>

<BundledLayoutPackage Include="MicrosoftNetCoreAppHostPackNupkg_Alternate" Condition="'$(AlternateAppHostRid)' != ''">
<!-- These apphost packages come from different verticals and require a join inside the VMR. Disable for now:
https://github.com/dotnet/source-build/issues/4114 -->
<BundledLayoutPackage Include="MicrosoftNetCoreAppHostPackNupkg_Alternate" Condition="'$(AlternateAppHostRid)' != '' and '$(DotNetBuild)' != 'true'">
<PackageName>Microsoft.NETCore.App.Host.$(AlternateAppHostRid)</PackageName>
<PackageVersion>$(MicrosoftNETCoreAppHostPackageVersion)</PackageVersion>
<TargetFramework>$(TargetFramework)</TargetFramework>
<RelativeLayoutPath>packs/%(PackageName)/%(PackageVersion)</RelativeLayoutPath>
</BundledLayoutPackage>

<BundledLayoutPackage Include="MicrosoftNetCoreAppHostPackNupkg_Arm64" Condition="'$(Arm64AppHostRid)' != ''">
<BundledLayoutPackage Include="MicrosoftNetCoreAppHostPackNupkg_Arm64" Condition="'$(Arm64AppHostRid)' != '' and '$(DotNetBuild)' != 'true'">
<PackageName>Microsoft.NETCore.App.Host.$(Arm64AppHostRid)</PackageName>
<PackageVersion>$(MicrosoftNETCoreAppHostPackageVersion)</PackageVersion>
<TargetFramework>$(TargetFramework)</TargetFramework>
<RelativeLayoutPath>packs/%(PackageName)/%(PackageVersion)</RelativeLayoutPath>
</BundledLayoutPackage>

<BundledLayoutPackage Include="MicrosoftNetCoreAppHostPackNupkg_x64" Condition="'$(x64AppHostRid)' != ''">
<BundledLayoutPackage Include="MicrosoftNetCoreAppHostPackNupkg_x64" Condition="'$(x64AppHostRid)' != '' and '$(DotNetBuild)' != 'true'">
<PackageName>Microsoft.NETCore.App.Host.$(x64AppHostRid)</PackageName>
<PackageVersion>$(MicrosoftNETCoreAppHostPackageVersion)</PackageVersion>
<TargetFramework>$(TargetFramework)</TargetFramework>
Expand Down Expand Up @@ -256,24 +256,19 @@
<DownloadFileName>$(DownloadedNetCoreAppHostPackInstallerFileName)</DownloadFileName>
</BundledInstallerComponent>

<!-- WORKAROUND: Generating the MSIs for x86 and x64 requires the outputs from the other VMR build. Disabled for now. -->
<!-- These are apphosts form a different vertical which require a join. Disable for now.
https://github.com/dotnet/source-build/issues/4114. -->
<BundledInstallerComponent Include="DownloadedAlternateNetCoreAppHostPackInstallerFile"
Condition="'$(SkipBuildingInstallers)' != 'true' And '$(InstallerExtension)' == '.msi' And !$(Architecture.StartsWith('arm'))">
Condition="'$(SkipBuildingInstallers)' != 'true' and '$(InstallerExtension)' == '.msi' and !$(Architecture.StartsWith('arm')) and '$(DotNetBuild)' != 'true'">
<BaseUrl>$(NetRuntimeRootUrl)</BaseUrl>
<!-- Alternate and arm64 apphosts aren't currently built in the same vertical.
This is an issue (see https://github.com/dotnet/source-build/issues/4114). For now, use the
dotnetbuilds url in VMR mode to find them. -->
<BaseUrl Condition="'$(DotNetBuild)' == 'true'">$(FallbackPublicBaseURL)Runtime/$(NetRuntimeBlobVersion)</BaseUrl>
<DownloadFileName>$(DownloadedAlternateNetCoreAppHostPackInstallerFileName)</DownloadFileName>
</BundledInstallerComponent>

<!-- These are apphosts form a different vertical which require a join. Disable for now.
https://github.com/dotnet/source-build/issues/4114. -->
<BundledInstallerComponent Include="DownloadedArm64NetCoreAppHostPackInstallerFile"
Condition="'$(SkipBuildingInstallers)' != 'true' And '$(InstallerExtension)' == '.msi' And !$(Architecture.StartsWith('arm'))">
Condition="'$(SkipBuildingInstallers)' != 'true' And '$(InstallerExtension)' == '.msi' And !$(Architecture.StartsWith('arm')) and '$(DotNetBuild)' != 'true'">
<BaseUrl>$(NetRuntimeRootUrl)</BaseUrl>
<!-- Alternate and arm64 apphosts aren't currently built in the same vertical.
This is an issue (see https://github.com/dotnet/source-build/issues/4114). For now, use the
dotnetbuilds url in VMR mode to find them. -->
<BaseUrl Condition="'$(DotNetBuild)' == 'true'">$(FallbackPublicBaseURL)Runtime/$(NetRuntimeBlobVersion)</BaseUrl>
<DownloadFileName>$(DownloadedArm64NetCoreAppHostPackInstallerFileName)</DownloadFileName>
</BundledInstallerComponent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@

<Target Name="GenerateSdkBundle"
DependsOnTargets="GenerateLayout;AcquireWix;MsiTargetsSetupInputOutputs;GenerateSdkMsi;GenerateTemplatesMsis;GenerateWorkloadManifestsWxs"
Condition=" '$(OS)' == 'Windows_NT' "
Condition="'$(OS)' == 'Windows_NT' and '$(SkipBuildingSdkBundle)' != 'true'"
Inputs="$(SdkMSIInstallerFile);
$(DownloadedSharedFrameworkInstallerFile);
$(DownloadedHostFxrInstallerFile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@

<ItemGroup>
<PackageReference Include="Microsoft.Build.Framework" PrivateAssets="All" />
<PackageReference Include="Microsoft.Deployment.DotNet.Releases" />
<PackageReference Include="Microsoft.Deployment.DotNet.Releases">
<VersionOverride Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">$(MicrosoftDeploymentDotNetReleasesToolsetPackageVersion)</VersionOverride>
</PackageReference>
</ItemGroup>

<!-- To reduce dll load (cause RPS perf regression). Directly compile files from Microsoft.DotNet.NativeWrapper, Microsoft.DotNet.SdkResolver, and the workload resolver -->
Expand Down Expand Up @@ -96,17 +98,19 @@
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" PrivateAssets="All" ExcludeAssets="Runtime" />
<PackageReference Include="System.Collections.Immutable" VersionOverride="$(SystemCollectionsImmutableToolsetPackageVersion)" />
<!-- Used by ResolveHostfxrCopyLocalContent below -->
<PackageDownload Include="Microsoft.NETCore.App.Runtime.win-x86" Version="[$(MicrosoftNETCoreAppRuntimePackageVersion)]" />
<PackageDownload Include="Microsoft.NETCore.App.Runtime.win-x64" Version="[$(MicrosoftNETCoreAppRuntimePackageVersion)]" />
<PackageDownload Include="Microsoft.NETCore.App.Runtime.win-arm64" Version="[$(MicrosoftNETCoreAppRuntimePackageVersion)]" />
<PackageDownload Include="Microsoft.NETCore.App.Runtime.win-x86" Version="[$(MicrosoftNETCoreAppRuntimePackageVersion)]" Condition="'$(DotNetBuild)' != 'true' or '$(DotNetBuildPass)' == '2'" />
<PackageDownload Include="Microsoft.NETCore.App.Runtime.win-x64" Version="[$(MicrosoftNETCoreAppRuntimePackageVersion)]" Condition="'$(DotNetBuild)' != 'true' or '$(DotNetBuildPass)' == '2'" />
<PackageDownload Include="Microsoft.NETCore.App.Runtime.win-arm64" Version="[$(MicrosoftNETCoreAppRuntimePackageVersion)]" Condition="'$(DotNetBuild)' != 'true' or '$(DotNetBuildPass)' == '2'" />
</ItemGroup>

<ItemGroup>
<!-- Reference this package to avoid package downgrade errors. See https://github.com/dotnet/sdk/issues/3044 for details -->
<PackageReference Include="Microsoft.NETCore.Targets" ExcludeAssets="all" PrivateAssets="all" />
</ItemGroup>

<Target Name="ResolveHostfxrCopyLocalContent" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" BeforeTargets="AssignTargetPaths">
<Target Name="ResolveHostfxrCopyLocalContent"
Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and ('$(DotNetBuild)' != 'true' or '$(DotNetBuildPass)' == '2')"
BeforeTargets="AssignTargetPaths">
<ItemGroup>
<Content Include="$(NuGetPackageRoot)/microsoft.netcore.app.runtime.win-x86/$(MicrosoftNETCoreAppRuntimePackageVersion)/runtimes/win-x86/native/hostfxr.dll">
<Link>x86/hostfxr.dll</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@
<Reference Include="System.Core" />
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" PrivateAssets="All" ExcludeAssets="Runtime" />
<!-- Used by ResolveHostfxrCopyLocalContent below -->
<PackageDownload Include="Microsoft.NETCore.App.Runtime.win-x86" Version="[$(MicrosoftNETCoreAppRuntimePackageVersion)]" />
<PackageDownload Include="Microsoft.NETCore.App.Runtime.win-x64" Version="[$(MicrosoftNETCoreAppRuntimePackageVersion)]" />
<PackageDownload Include="Microsoft.NETCore.App.Runtime.win-x86" Version="[$(MicrosoftNETCoreAppRuntimePackageVersion)]" Condition="'$(DotNetBuild)' != 'true' or '$(DotNetBuildPass)' == '2'" />
<PackageDownload Include="Microsoft.NETCore.App.Runtime.win-x64" Version="[$(MicrosoftNETCoreAppRuntimePackageVersion)]" Condition="'$(DotNetBuild)' != 'true' or '$(DotNetBuildPass)' == '2'" />
</ItemGroup>

<Target Name="ResolveHostfxrCopyLocalContent" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" BeforeTargets="AssignTargetPaths">
<Target Name="ResolveHostfxrCopyLocalContent"
Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and ('$(DotNetBuild)' != 'true' or '$(DotNetBuildPass)' == '2')"
BeforeTargets="AssignTargetPaths">
<ItemGroup>
<Content Include="$(NuGetPackageRoot)/microsoft.netcore.app.runtime.win-x86/$(MicrosoftNETCoreAppRuntimePackageVersion)/runtimes/win-x86/native/hostfxr.dll">
<Link>x86/hostfxr.dll</Link>
Expand Down
2 changes: 2 additions & 0 deletions src/SourceBuild/content/repo-projects/sdk.proj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
<BuildArgs Condition="'$(TargetOS)' != 'windows'">$(BuildArgs) /p:NetRuntimeRid=$(TargetRid)</BuildArgs>
<!-- https://github.com/dotnet/source-build/issues/4138 -->
<BuildArgs Condition="'$(TargetOS)' != 'windows' and '$(TargetOS)' != 'osx'">$(BuildArgs) /p:SkipBuildingInstallers=true</BuildArgs>
<!-- https://github.com/dotnet/source-build/issues/4693 -->
<BuildArgs Condition="'$(TargetOS)' == 'windows' and '$(UseOfficialBuildVersioning)' != 'true'">$(BuildArgs) /p:SkipBuildingInstallers=true /p:SkipBuildingSdkBundle=true</BuildArgs>

<BuildArgs>$(BuildArgs) /p:PublicBaseURL=file:%2F%2F$(ArtifactsAssetsDir)</BuildArgs>
<!-- In non-source-only scenarios, currently consume aspnetcore from the normal public base url -->
Expand Down

0 comments on commit 49c50d2

Please sign in to comment.