Skip to content

Commit 932dd44

Browse files
Backflow from https://github.com/dotnet/dotnet / c4217ee build 301350
[[ commit created by automation ]]
1 parent 64f46da commit 932dd44

File tree

9 files changed

+129
-20
lines changed

9 files changed

+129
-20
lines changed

eng/Publishing.props

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,19 @@
4343
<Artifact Remove="@(MsiPackages)" />
4444
</ItemGroup>
4545

46-
<ItemGroup Condition="'$(PublishingWorkloadMsiInternal)' == 'true'">
46+
<!-- In 2xx+ bands, MSI packages are downloaded from the 1xx build rather than built locally.
47+
Mark them as Internal to avoid republishing. -->
48+
<ItemGroup Condition="'$(DownloadWorkloadMsis)' == 'true'">
4749
<Artifact Update="$(ArtifactsShippingPackagesDir)*.Msi.*.nupkg" Visibility="Internal" />
4850
</ItemGroup>
4951

52+
<!-- In 2xx+ bands, don't publish workload manifest packages since these are versioned the same as the 1xx
53+
band and would cause conflicts. -->
54+
<ItemGroup Condition="'$(DotNet1xxWorkloadManifestVersion)' != ''">
55+
<Artifact Update="$(ArtifactsShippingPackagesDir)Microsoft.NET.Workload.*.Manifest-*.nupkg" Visibility="Internal" />
56+
<Artifact Update="$(ArtifactsNonShippingPackagesDir)Microsoft.NET.Workload.*.Manifest-*.nupkg" Visibility="Internal" />
57+
</ItemGroup>
58+
5059
<Target Name="GetNonStableProductVersion">
5160
<!-- Retrieve the non-stable product version. -->
5261
<MSBuild Projects="$(RepoRoot)src\Layout\redist\redist.csproj"

eng/Versions.props

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
<VersionMajor>11</VersionMajor>
77
<VersionMinor>0</VersionMinor>
88
<VersionSDKMinor>1</VersionSDKMinor>
9-
<VersionFeature>00</VersionFeature>
9+
<VersionSDKMinorPatch>0</VersionSDKMinorPatch>
10+
<VersionFeature>$([System.String]::Copy('$(VersionSDKMinorPatch)').PadLeft(2, '0'))</VersionFeature>
1011
<VersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionSDKMinor)$(VersionFeature)</VersionPrefix>
1112
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
12-
<PreReleaseVersionIteration>1</PreReleaseVersionIteration>
13+
<PreReleaseVersionIteration>2</PreReleaseVersionIteration>
1314
<!-- Allowed values: '', 'prerelease', 'release'. Set to 'release' when stabilizing. -->
1415
<DotNetFinalVersionKind></DotNetFinalVersionKind>
1516

@@ -44,13 +45,6 @@
4445
<VersionFeature90ForWorkloads>$(VersionFeature90)</VersionFeature90ForWorkloads>
4546
<VersionFeature100ForWorkloads>$(VersionFeature100)</VersionFeature100ForWorkloads>
4647
</PropertyGroup>
47-
48-
<PropertyGroup Label="Restore feeds">
49-
<!-- In an orchestrated build, this may be overridden to other Azure feeds. -->
50-
<DotNetAssetRootUrl Condition="'$(DotNetAssetRootUrl)'==''">https://ci.dot.net/public/</DotNetAssetRootUrl>
51-
<DotNetPrivateAssetRootUrl Condition="'$(DotNetPrivateAssetRootUrl)'==''">https://dotnetclimsrc.blob.core.windows.net/dotnet/</DotNetPrivateAssetRootUrl>
52-
</PropertyGroup>
53-
5448
<PropertyGroup Label="Production dependencies">
5549
<MicrosoftCssParserVersion>1.0.0-20230414.1</MicrosoftCssParserVersion>
5650
<MicrosoftApplicationInsightsPackageVersion>2.23.0</MicrosoftApplicationInsightsPackageVersion>

src/Cli/dotnet/Installer/Windows/InstallerBase.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ protected void LogException(Exception exception)
195195
static InstallerBase()
196196
{
197197
CurrentProcess = Process.GetCurrentProcess();
198+
#if !DOT_NET_BUILD_FROM_SOURCE
198199
ParentProcess = CurrentProcess.GetParentProcess();
200+
#endif
199201
ProcessorArchitecture = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE").ToLowerInvariant();
200202
}
201203
}

src/Layout/redist/targets/GenerateLayout.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@
219219

220220
<Target Name="PublishTestCli">
221221
<PropertyGroup>
222-
<TestCliNuGetDirectoryTargetFramework>net9.0</TestCliNuGetDirectoryTargetFramework>
222+
<TestCliNuGetDirectoryTargetFramework>net10.0</TestCliNuGetDirectoryTargetFramework>
223223
<TestCliNuGetDirectoryTargetFramework Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(NetCurrent)</TestCliNuGetDirectoryTargetFramework>
224224
<TestCliNuGetDirectory>$(NuGetPackageRoot)microsoft.testplatform.cli/$(MicrosoftTestPlatformCLIPackageVersion)/contentFiles/any/$(TestCliNuGetDirectoryTargetFramework)/</TestCliNuGetDirectory>
225225
</PropertyGroup>

src/Tasks/Microsoft.NET.Build.Tasks/sdk/Sdk.BundledVersions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ Copyright (c) .NET Foundation. All rights reserved.
1717
<NETCoreSdkBundledVersionsProps>$(MSBuildThisFileDirectory)..\..\..\Microsoft.NETCoreSdk.BundledVersions.props</NETCoreSdkBundledVersionsProps>
1818
</PropertyGroup>
1919

20-
<Import Project="$(NETCoreSdkBundledVersionsProps)" Condition="'$(NetCoreSdkRoot)' == '' and Exists('$(NETCoreSdkBundledVersionsProps)')" />
20+
<Import Project="$(NETCoreSdkBundledVersionsProps)" Condition="'$(NetCoreSdkRoot)' == '' and Exists('$(NETCoreSdkBundledVersionsProps)')" />
2121

2222
</Project>

src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.BeforeCommon.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ Copyright (c) .NET Foundation. All rights reserved.
1717

1818
<!-- Import bundled version information that needs to be available before the Common.props / D.B.props import
1919
in order for users to be able to reference it. -->
20-
<Import Project="$(NETCoreSdkBundledVersionsProps)" Condition="'$(NetCoreSdkRoot)' == '' and Exists('$(NETCoreSdkBundledVersionsProps)')" />
20+
<Import Project="$(NETCoreSdkBundledVersionsProps)" Condition="'$(NetCoreSdkRoot)' == '' and Exists('$(NETCoreSdkBundledVersionsProps)')" />
2121

2222
</Project>

src/Workloads/Manifests/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<IsShipping Condition="'$(MSBuildProjectName)' == 'Microsoft.NET.Workload.Emscripten.Current.Transport.Manifest'">false</IsShipping>
1313
<IsShippingPackage>$(IsShipping)</IsShippingPackage>
1414
<IncludeSymbols>false</IncludeSymbols>
15+
<PackageVersion Condition="'$(DotNet1xxWorkloadManifestVersion)' != ''">$(DotNet1xxWorkloadManifestVersion)</PackageVersion>
1516
</PropertyGroup>
1617

1718
<PropertyGroup>

src/Workloads/Manifests/manifest-packages.csproj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55
</ItemGroup>
66

77
<Target Name="LayoutBuiltinManifests">
8+
9+
<PropertyGroup>
10+
<_VersionOverride Condition="'$(DotNet1xxWorkloadManifestVersion)' != ''">Version=$(DotNet1xxWorkloadManifestVersion)</_VersionOverride>
11+
</PropertyGroup>
12+
813
<MSBuild Projects="@(ProjectReference)"
914
Targets="LayoutManifest"
10-
Properties="ManifestDirectory=$(ManifestDirectory)" />
15+
Properties="ManifestDirectory=$(ManifestDirectory);$(_VersionOverride)" />
1116
</Target>
1217

1318
</Project>

src/Workloads/VSInsertion/workloads.csproj

Lines changed: 104 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,10 @@
8080
<RuntimeWorkloadPacksToDownload Include="Microsoft.NETCore.App.Runtime.Mono.browser-wasm" />
8181
<RuntimeWorkloadPacksToDownload Include="Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm" />
8282
<RuntimeWorkloadPacksToDownload Include="Microsoft.NETCore.App.Runtime.Mono.wasi-wasm" />
83-
<RuntimeWorkloadPacksToDownload Include="Microsoft.NETCore.App.Runtime.win-arm64" />
84-
<RuntimeWorkloadPacksToDownload Include="Microsoft.NETCore.App.Runtime.win-x64" />
85-
<RuntimeWorkloadPacksToDownload Include="Microsoft.NETCore.App.Runtime.win-x86" />
83+
<!-- Windows runtime packages don't need MSI wrappers - they're included in the SDK, not installed as workloads -->
84+
<RuntimeWorkloadPacksToDownload Include="Microsoft.NETCore.App.Runtime.win-arm64" ExcludeAsMsi="true" />
85+
<RuntimeWorkloadPacksToDownload Include="Microsoft.NETCore.App.Runtime.win-x64" ExcludeAsMsi="true" />
86+
<RuntimeWorkloadPacksToDownload Include="Microsoft.NETCore.App.Runtime.win-x86" ExcludeAsMsi="true" />
8687

8788
<EmsdkWorkloadPacksToDownload Include="Microsoft.NET.Runtime.Emscripten.$(EmscriptenVersionCurrent).Cache.win-x64" />
8889
<EmsdkWorkloadPacksToDownload Include="Microsoft.NET.Runtime.Emscripten.$(EmscriptenVersionCurrent).Cache.win-arm64" />
@@ -94,13 +95,82 @@
9495
<EmsdkWorkloadPacksToDownload Include="Microsoft.NET.Runtime.Emscripten.$(EmscriptenVersionCurrent).Sdk.win-arm64" />
9596
</ItemGroup>
9697

97-
<ItemGroup Condition="'$(BuildWorkloads)' == 'true'">
98+
<ItemGroup>
99+
<!-- Dynamically discover manifest project files -->
100+
<_ManifestProjectFiles Include="../Manifests/**/*.proj" Exclude="../Manifests/**/*.Transport.*/*.proj" />
101+
<!-- Extract package names from file paths (e.g., Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest.proj -> Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest) -->
102+
<ManifestPackagesToDownload Include="@(_ManifestProjectFiles->'%(Filename)')" />
103+
</ItemGroup>
104+
105+
<ItemGroup Condition="'$(BuildWorkloads)' == 'true' and '$(DownloadWorkloadMsis)' != 'true'">
98106
<!-- we use MicrosoftNETCoreAppRuntimePackageVersion for both runtime and emsdk packages since they're aligned in VMR builds -->
99107
<PackageDownload Include="@(RuntimeWorkloadPacksToDownload)" Version="[$(MicrosoftNETCoreAppRuntimePackageVersion)]" />
100108
<PackageDownload Include="@(EmsdkWorkloadPacksToDownload)" Version="[$(MicrosoftNETCoreAppRuntimePackageVersion)]" />
101109
</ItemGroup>
102110

103-
<Target Name="_CollectDownloadedWorkloadPacks">
111+
<Target Name="_AddMsiPackageDownloads"
112+
BeforeTargets="CollectPackageDownloads"
113+
Condition="'$(BuildWorkloads)' == 'true' and '$(DownloadWorkloadMsis)' == 'true'">
114+
<ItemGroup>
115+
<!-- MSI packages for RuntimeWorkloadPacksToDownload -->
116+
<!-- For RID-specific packages, add single MSI with matching architecture -->
117+
<PackageDownload Include="%(RuntimeWorkloadPacksToDownload.Identity).Msi.x64"
118+
Version="[$(DotNet1xxRuntimeVersion)]"
119+
Condition="$([System.String]::Copy('%(RuntimeWorkloadPacksToDownload.Identity)').Contains('.win-x64')) and '%(RuntimeWorkloadPacksToDownload.ExcludeAsMsi)' != 'true'" />
120+
<PackageDownload Include="%(RuntimeWorkloadPacksToDownload.Identity).Msi.x86"
121+
Version="[$(DotNet1xxRuntimeVersion)]"
122+
Condition="$([System.String]::Copy('%(RuntimeWorkloadPacksToDownload.Identity)').Contains('.win-x86')) and '%(RuntimeWorkloadPacksToDownload.ExcludeAsMsi)' != 'true'" />
123+
<PackageDownload Include="%(RuntimeWorkloadPacksToDownload.Identity).Msi.arm64"
124+
Version="[$(DotNet1xxRuntimeVersion)]"
125+
Condition="$([System.String]::Copy('%(RuntimeWorkloadPacksToDownload.Identity)').Contains('.win-arm64')) and '%(RuntimeWorkloadPacksToDownload.ExcludeAsMsi)' != 'true'" />
126+
127+
<!-- For non-RID-specific packages, add MSI packages for all three architectures -->
128+
<PackageDownload Include="%(RuntimeWorkloadPacksToDownload.Identity).Msi.x86"
129+
Version="[$(DotNet1xxRuntimeVersion)]"
130+
Condition="!$([System.String]::Copy('%(RuntimeWorkloadPacksToDownload.Identity)').Contains('.win-')) and '%(RuntimeWorkloadPacksToDownload.ExcludeAsMsi)' != 'true'" />
131+
<PackageDownload Include="%(RuntimeWorkloadPacksToDownload.Identity).Msi.x64"
132+
Version="[$(DotNet1xxRuntimeVersion)]"
133+
Condition="!$([System.String]::Copy('%(RuntimeWorkloadPacksToDownload.Identity)').Contains('.win-')) and '%(RuntimeWorkloadPacksToDownload.ExcludeAsMsi)' != 'true'" />
134+
<PackageDownload Include="%(RuntimeWorkloadPacksToDownload.Identity).Msi.arm64"
135+
Version="[$(DotNet1xxRuntimeVersion)]"
136+
Condition="!$([System.String]::Copy('%(RuntimeWorkloadPacksToDownload.Identity)').Contains('.win-')) and '%(RuntimeWorkloadPacksToDownload.ExcludeAsMsi)' != 'true'" />
137+
138+
<!-- MSI packages for EmsdkWorkloadPacksToDownload -->
139+
<!-- For RID-specific packages, add single MSI with matching architecture -->
140+
<PackageDownload Include="%(EmsdkWorkloadPacksToDownload.Identity).Msi.x64"
141+
Version="[$(DotNet1xxRuntimeVersion)]"
142+
Condition="$([System.String]::Copy('%(EmsdkWorkloadPacksToDownload.Identity)').Contains('.win-x64'))" />
143+
<PackageDownload Include="%(EmsdkWorkloadPacksToDownload.Identity).Msi.x86"
144+
Version="[$(DotNet1xxRuntimeVersion)]"
145+
Condition="$([System.String]::Copy('%(EmsdkWorkloadPacksToDownload.Identity)').Contains('.win-x86'))" />
146+
<PackageDownload Include="%(EmsdkWorkloadPacksToDownload.Identity).Msi.arm64"
147+
Version="[$(DotNet1xxRuntimeVersion)]"
148+
Condition="$([System.String]::Copy('%(EmsdkWorkloadPacksToDownload.Identity)').Contains('.win-arm64'))" />
149+
150+
<!-- For non-RID-specific packages, add MSI packages for all three architectures -->
151+
<PackageDownload Include="%(EmsdkWorkloadPacksToDownload.Identity).Msi.x86"
152+
Version="[$(DotNet1xxRuntimeVersion)]"
153+
Condition="!$([System.String]::Copy('%(EmsdkWorkloadPacksToDownload.Identity)').Contains('.win-'))" />
154+
<PackageDownload Include="%(EmsdkWorkloadPacksToDownload.Identity).Msi.x64"
155+
Version="[$(DotNet1xxRuntimeVersion)]"
156+
Condition="!$([System.String]::Copy('%(EmsdkWorkloadPacksToDownload.Identity)').Contains('.win-'))" />
157+
<PackageDownload Include="%(EmsdkWorkloadPacksToDownload.Identity).Msi.arm64"
158+
Version="[$(DotNet1xxRuntimeVersion)]"
159+
Condition="!$([System.String]::Copy('%(EmsdkWorkloadPacksToDownload.Identity)').Contains('.win-'))" />
160+
161+
<!-- MSI packages for ManifestPackagesToDownload -->
162+
<!-- Manifest packages are not RID-specific, add MSI packages for all three architectures -->
163+
<PackageDownload Include="%(ManifestPackagesToDownload.Identity)-$(BuiltInWorkloadFeatureBand).Msi.x86"
164+
Version="[$(DotNet1xxWorkloadManifestVersion)]" />
165+
<PackageDownload Include="%(ManifestPackagesToDownload.Identity)-$(BuiltInWorkloadFeatureBand).Msi.x64"
166+
Version="[$(DotNet1xxWorkloadManifestVersion)]" />
167+
<PackageDownload Include="%(ManifestPackagesToDownload.Identity)-$(BuiltInWorkloadFeatureBand).Msi.arm64"
168+
Version="[$(DotNet1xxWorkloadManifestVersion)]" />
169+
</ItemGroup>
170+
</Target>
171+
172+
<Target Name="_CollectDownloadedWorkloadPacks"
173+
Condition="'$(BuildWorkloads)' == 'true' and '$(DownloadWorkloadMsis)' != 'true'">
104174
<ItemGroup>
105175
<DownloadedWorkloadPacks Include="$(NuGetPackageRoot)\%(RuntimeWorkloadPacksToDownload.Identity)\$(MicrosoftNETCoreAppRuntimePackageVersion)\*.nupkg" />
106176
<DownloadedWorkloadPacks Include="$(NuGetPackageRoot)\%(EmsdkWorkloadPacksToDownload.Identity)\$(MicrosoftNETCoreAppRuntimePackageVersion)\*.nupkg" />
@@ -111,7 +181,35 @@
111181
UseHardlinksIfPossible="true" />
112182
</Target>
113183

114-
<Target Name="Build" DependsOnTargets="ResolveProjectReferences;GetAssemblyVersion;_GetVersionProps;_GenerateMsiVersionString;_CollectDownloadedWorkloadPacks" Condition="'$(BuildWorkloads)' == 'true'">
184+
<Target Name="Build"
185+
DependsOnTargets="
186+
ResolveProjectReferences;
187+
GetAssemblyVersion;
188+
_GetVersionProps;
189+
_GenerateMsiVersionString;
190+
_CollectDownloadedWorkloadPacks;
191+
_CollectDownloadedWorkloadMsis;
192+
BuildWorkloadMsis"
193+
Condition="'$(BuildWorkloads)' == 'true'">
194+
</Target>
195+
196+
<Target Name="_CollectDownloadedWorkloadMsis"
197+
Condition="'$(BuildWorkloads)' == 'true' and '$(DownloadWorkloadMsis)' == 'true'">
198+
<ItemGroup>
199+
<DownloadedWorkloadMsis Include="$(NuGetPackageRoot)\%(RuntimeWorkloadPacksToDownload.Identity).Msi.*\$(DotNet1xxRuntimeVersion)\*.nupkg"
200+
Condition="'%(RuntimeWorkloadPacksToDownload.ExcludeAsMsi)' != 'true'" />
201+
<DownloadedWorkloadMsis Include="$(NuGetPackageRoot)\%(EmsdkWorkloadPacksToDownload.Identity).Msi.*\$(DotNet1xxRuntimeVersion)\*.nupkg" />
202+
<DownloadedWorkloadMsis Include="$(NuGetPackageRoot)\%(ManifestPackagesToDownload.Identity)-$(BuiltInWorkloadFeatureBand).Msi.*\$(DotNet1xxWorkloadManifestVersion)\*.nupkg" />
203+
</ItemGroup>
204+
205+
<!-- Copy to shipping packages directory so they appear as build outputs -->
206+
<Copy SourceFiles="@(DownloadedWorkloadMsis)"
207+
DestinationFolder="$(ArtifactsShippingPackagesDir)"
208+
UseHardlinksIfPossible="true" />
209+
</Target>
210+
211+
<Target Name="BuildWorkloadMsis"
212+
Condition="'$(BuildWorkloads)' == 'true' and '$(DownloadWorkloadMsis)' != 'true'">
115213
<ItemGroup>
116214
<!-- Overrides for Visual Studio setup generation. If the workload definition IDs change,
117215
these must be updated. -->

0 commit comments

Comments
 (0)