Skip to content

Commit 60bd7c5

Browse files
Merge branch 'main' into new.installer.infra
2 parents 7d37266 + d58f584 commit 60bd7c5

File tree

74 files changed

+4167
-1768
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+4167
-1768
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"microsoft.dotnet.darc": {
6-
"version": "1.1.0-beta.24562.2",
6+
"version": "1.1.0-beta.24563.1",
77
"commands": [
88
"darc"
99
]

.vsts-ci.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -288,15 +288,13 @@ extends:
288288
runTests: false
289289

290290
############### SOURCE BUILD ###############
291-
# Temporarily removed until the SDK can target net10. The assets produced by upstream repos
292-
# are net10, but this repo needs net9.
293-
# - template: /eng/common/templates-official/job/source-build.yml@self
294-
# parameters:
295-
# platform:
296-
# name: Managed
297-
# container: centosStream9
298-
# jobProperties:
299-
# timeoutInMinutes: 30
291+
- template: /eng/common/templates-official/job/source-build.yml@self
292+
parameters:
293+
platform:
294+
name: Managed
295+
container: centosStream9
296+
jobProperties:
297+
timeoutInMinutes: 30
300298

301299
############### DOTNET-FORMAT ###############
302300
- ${{ if or(eq(parameters.runTestBuild, true), eq(variables['Build.Reason'], 'PullRequest')) }}:

.vsts-pr.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,13 @@ stages:
6565
helixTargetQueue: osx.13.amd64.open
6666

6767
############### SOURCE BUILD ###############
68-
# Temporarily removed until the SDK can target net10. The assets produced by upstream repos
69-
# are net10, but this repo needs net9.
70-
# - template: /eng/common/templates-official/job/source-build.yml@self
71-
# parameters:
72-
# platform:
73-
# name: Managed
74-
# container: centosStream9
75-
# jobProperties:
76-
# timeoutInMinutes: 30
68+
- template: /eng/common/templates/job/source-build.yml@self
69+
parameters:
70+
platform:
71+
name: Managed
72+
container: centosStream9
73+
jobProperties:
74+
timeoutInMinutes: 30
7775

7876
############### DOTNET-FORMAT ###############
7977
- template: /eng/dotnet-format/dotnet-format-integration.yml

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
<SdkTargetFramework>net10.0</SdkTargetFramework>
3838
<!-- TODO: Remove when Arcade updated NetCurrent to net10.0. -->
3939
<NetCurrent>net10.0</NetCurrent>
40+
<NetToolMinimum Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(NetCurrent)</NetToolMinimum>
4041
<ToolsetTargetFramework>$(SdkTargetFramework)</ToolsetTargetFramework>
4142
<VisualStudioServiceTargetFramework>net8.0</VisualStudioServiceTargetFramework>
4243

eng/Version.Details.xml

Lines changed: 236 additions & 240 deletions
Large diffs are not rendered by default.

eng/Versions.props

Lines changed: 91 additions & 101 deletions
Large diffs are not rendered by default.

eng/common/native/install-dependencies.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ case "$os" in
4444
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
4545
# Skip brew update for now, see https://github.com/actions/setup-python/issues/577
4646
# brew update --preinstall
47+
48+
# Temporarily uninstall [email protected] to work around https://github.com/actions/runner-images/issues/10984
49+
brew uninstall --ignore-dependencies --force [email protected]
50+
4751
brew bundle --no-upgrade --no-lock --file=- <<EOF
4852
brew "cmake"
4953
brew "icu4c"

eng/pipelines/templates/jobs/sdk-job-matrix.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ parameters:
1212
runTestsAsTool: true
1313
# This job uses the build step for testing, so the extra test step is not necessary.
1414
runTests: false
15-
# turn off template engine for windows because of agent images, VS versions and COM issues.
16-
# - categoryName: TemplateEngine
17-
# testProjects: $(Build.SourcesDirectory)/test/Microsoft.TemplateEngine.Cli.UnitTests/Microsoft.TemplateEngine.Cli.UnitTests.csproj;$(Build.SourcesDirectory)/test/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj
18-
# publishXunitResults: true
15+
- categoryName: TemplateEngine
16+
testProjects: $(Build.SourcesDirectory)/test/Microsoft.TemplateEngine.Cli.UnitTests/Microsoft.TemplateEngine.Cli.UnitTests.csproj;$(Build.SourcesDirectory)/test/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj
17+
publishXunitResults: true
1918
- categoryName: AoT
2019
runAoTTests: true
2120
### LINUX ###

eng/pipelines/templates/stages/vmr-build.yml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -942,6 +942,64 @@ stages:
942942
targetArchitecture: arm64
943943
targetRid: ${{ variables.linuxMuslArm64Rid }}
944944

945+
- template: ../jobs/vmr-build.yml
946+
parameters:
947+
buildName: AzureLinux_x64_Cross_ShortStack_Alpine_Mono_CrossAOT
948+
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
949+
vmrBranch: ${{ variables.VmrBranch }}
950+
architecture: x64
951+
pool: ${{ parameters.pool_Linux }}
952+
container: ${{ variables.azurelinuxX64AlpineCrossContainer }}
953+
crossRootFs: '/crossrootfs/x64'
954+
targetOS: linux-musl
955+
targetArchitecture: x64
956+
targetRid: ${{ variables.linuxMuslX64Rid }}
957+
extraProperties: /p:DotNetBuildMonoCrossAOT=true
958+
runTests: false
959+
960+
- template: ../jobs/vmr-build.yml
961+
parameters:
962+
buildName: AzureLinux_x64_Cross_ShortStack_Alpine_Mono_CrossAOT
963+
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
964+
vmrBranch: ${{ variables.VmrBranch }}
965+
architecture: arm64
966+
pool: ${{ parameters.pool_Linux }}
967+
container: ${{ variables.azurelinuxArm64AlpineCrossContainer }}
968+
crossRootFs: '/crossrootfs/arm64'
969+
targetOS: linux-musl
970+
targetArchitecture: arm64
971+
targetRid: ${{ variables.linuxMuslX64Rid }}
972+
extraProperties: /p:DotNetBuildMonoCrossAOT=true
973+
runTests: false
974+
975+
- template: ../jobs/vmr-build.yml
976+
parameters:
977+
buildName: AzureLinux_x64_Cross_ShortStack_Mono_CrossAOT
978+
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
979+
vmrBranch: ${{ variables.VmrBranch }}
980+
architecture: x64
981+
pool: ${{ parameters.pool_Linux_Shortstack }}
982+
container: ${{ variables.azurelinuxX64CrossContainer }}
983+
crossRootFs: '/crossrootfs/x64'
984+
targetOS: linux
985+
targetArchitecture: x64
986+
extraProperties: /p:DotNetBuildMonoCrossAOT=true
987+
runTests: false
988+
989+
- template: ../jobs/vmr-build.yml
990+
parameters:
991+
buildName: AzureLinux_x64_Cross_ShortStack_Mono_CrossAOT
992+
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
993+
vmrBranch: ${{ variables.VmrBranch }}
994+
architecture: arm64
995+
pool: ${{ parameters.pool_Linux_Shortstack }}
996+
container: ${{ variables.azurelinuxArm64CrossContainer }}
997+
crossRootFs: '/crossrootfs/arm64'
998+
targetOS: linux
999+
targetArchitecture: arm64
1000+
extraProperties: /p:DotNetBuildMonoCrossAOT=true
1001+
runTests: false
1002+
9451003
- template: ../jobs/vmr-build.yml
9461004
parameters:
9471005
buildName: AzureLinux_x64_Cross_ShortStack_Mono_LLVMAOT
@@ -993,6 +1051,30 @@ stages:
9931051
targetOS: osx
9941052
targetArchitecture: arm64
9951053

1054+
- template: ../jobs/vmr-build.yml
1055+
parameters:
1056+
buildName: OSX_ShortStack_Mono_CrossAOT
1057+
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
1058+
vmrBranch: ${{ variables.VmrBranch }}
1059+
architecture: x64
1060+
pool: ${{ parameters.pool_Mac }}
1061+
targetOS: osx
1062+
targetArchitecture: x64
1063+
extraProperties: /p:DotNetBuildMonoCrossAOT=true
1064+
runTests: false
1065+
1066+
- template: ../jobs/vmr-build.yml
1067+
parameters:
1068+
buildName: OSX_ShortStack_Mono_CrossAOT
1069+
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
1070+
vmrBranch: ${{ variables.VmrBranch }}
1071+
architecture: arm64
1072+
pool: ${{ parameters.pool_Mac }}
1073+
targetOS: osx
1074+
targetArchitecture: arm64
1075+
extraProperties: /p:DotNetBuildMonoCrossAOT=true
1076+
runTests: false
1077+
9961078
- template: ../jobs/vmr-build.yml
9971079
parameters:
9981080
buildName: OSX_ShortStack_Mono_LLVMJIT
@@ -1051,6 +1133,30 @@ stages:
10511133
targetOS: windows
10521134
targetArchitecture: x64
10531135

1136+
- template: ../jobs/vmr-build.yml
1137+
parameters:
1138+
buildName: Windows_ShortStack_Mono_CrossAOT
1139+
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
1140+
vmrBranch: ${{ variables.VmrBranch }}
1141+
architecture: x64
1142+
pool: ${{ parameters.pool_Windows }}
1143+
targetOS: windows
1144+
targetArchitecture: x64
1145+
extraProperties: /p:DotNetBuildMonoCrossAOT=true
1146+
runTests: false
1147+
1148+
- template: ../jobs/vmr-build.yml
1149+
parameters:
1150+
buildName: Windows_ShortStack_Mono_CrossAOT
1151+
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
1152+
vmrBranch: ${{ variables.VmrBranch }}
1153+
architecture: arm64
1154+
pool: ${{ parameters.pool_Windows }}
1155+
targetOS: windows
1156+
targetArchitecture: arm64
1157+
extraProperties: /p:DotNetBuildMonoCrossAOT=true
1158+
runTests: false
1159+
10541160
- template: ../jobs/vmr-build.yml
10551161
parameters:
10561162
buildName: Windows

github-merge-flow.jsonc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
// IMPORTANT: This file is read by the merge flow from main branch only.
22
{
33
"merge-flow-configurations": {
4-
// Automate opening PRs to merge cli release/6.0.1xx to .4xx
5-
"release/6.0.1xx":{
6-
"MergeToBranch": "release/6.0.4xx",
7-
"ExtraSwitches": "-QuietComments"
8-
},
9-
// Automate opening PRs to merge cli release/6.0.4xx to 8.0.1xx
10-
"release/6.0.4xx":{
11-
"MergeToBranch": "release/8.0.1xx",
12-
"ExtraSwitches": "-QuietComments"
13-
},
144
// Automate opening PRs to merge cli release/8.0.1xx to 8.0.3xx
155
"release/8.0.1xx":{
166
"MergeToBranch": "release/8.0.3xx",

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"cmake": "latest"
1818
},
1919
"msbuild-sdks": {
20-
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.24564.1",
21-
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.24564.1",
20+
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.24570.4",
21+
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.24570.4",
2222
"Microsoft.Build.NoTargets": "3.7.0",
2323
"Microsoft.DotNet.CMake.Sdk": "9.0.0-beta.24217.1"
2424
}

src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,14 +403,19 @@ private List<PackageSource> LoadDefaultSources(PackageId packageId, PackageSourc
403403
continue;
404404
}
405405

406+
if (defaultSources.Any(defaultSource => defaultSource.SourceUri == packageSource.SourceUri))
407+
{
408+
continue;
409+
}
410+
406411
defaultSources.Add(packageSource);
407412
}
408413
}
409414

410415
return defaultSources;
411416
}
412417

413-
private IEnumerable<PackageSource> LoadNuGetSources(PackageId packageId, PackageSourceLocation packageSourceLocation = null, PackageSourceMapping packageSourceMapping = null)
418+
public IEnumerable<PackageSource> LoadNuGetSources(PackageId packageId, PackageSourceLocation packageSourceLocation = null, PackageSourceMapping packageSourceMapping = null)
414419
{
415420
var sources = (packageSourceLocation?.SourceFeedOverrides.Any() ?? false) ?
416421
LoadOverrideSources(packageSourceLocation) :

src/Cli/dotnet/commands/dotnet-workload/list/VisualStudioWorkloads.cs

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@
1212
namespace Microsoft.DotNet.Workloads.Workload
1313
{
1414
/// <summary>
15-
/// Provides functionality to query the status of .NET workloads in Visual Studio.
15+
/// Provides functionality to query the status of .NET workloads in Visual Studio.
1616
/// </summary>
1717
#if NETCOREAPP
1818
[SupportedOSPlatform("windows")]
1919
#endif
2020
internal static class VisualStudioWorkloads
2121
{
22+
private static readonly object s_guard = new();
23+
2224
private const int REGDB_E_CLASSNOTREG = unchecked((int)0x80040154);
2325

2426
/// <summary>
@@ -204,44 +206,50 @@ internal static IEnumerable<WorkloadId> WriteSDKInstallRecordsForVSWorkloads(IIn
204206
/// <returns>A list of Visual Studio instances.</returns>
205207
private static List<ISetupInstance> GetVisualStudioInstances()
206208
{
207-
List<ISetupInstance> vsInstances = new();
208-
209-
try
209+
// The underlying COM API has a bug where-by it's not safe for concurrent calls. Until their
210+
// bug fix is rolled out use a lock to ensure we don't concurrently access this API.
211+
// https://dev.azure.com/devdiv/DevDiv/_workitems/edit/2241752/
212+
lock (s_guard)
210213
{
211-
SetupConfiguration setupConfiguration = new();
212-
ISetupConfiguration2 setupConfiguration2 = setupConfiguration;
213-
IEnumSetupInstances setupInstances = setupConfiguration2.EnumInstances();
214-
ISetupInstance[] instances = new ISetupInstance[1];
215-
int fetched = 0;
214+
List<ISetupInstance> vsInstances = new();
216215

217-
do
216+
try
218217
{
219-
setupInstances.Next(1, instances, out fetched);
218+
SetupConfiguration setupConfiguration = new();
219+
ISetupConfiguration2 setupConfiguration2 = setupConfiguration;
220+
IEnumSetupInstances setupInstances = setupConfiguration2.EnumInstances();
221+
ISetupInstance[] instances = new ISetupInstance[1];
222+
int fetched = 0;
220223

221-
if (fetched > 0)
224+
do
222225
{
223-
ISetupInstance2 instance = (ISetupInstance2)instances[0];
226+
setupInstances.Next(1, instances, out fetched);
224227

225-
// .NET Workloads only shipped in 17.0 and later and we should only look at IDE based SKUs
226-
// such as community, professional, and enterprise.
227-
if (Version.TryParse(instance.GetInstallationVersion(), out Version version) &&
228-
version.Major >= 17 &&
229-
s_visualStudioProducts.Contains(instance.GetProduct().GetId()))
228+
if (fetched > 0)
230229
{
231-
vsInstances.Add(instances[0]);
230+
ISetupInstance2 instance = (ISetupInstance2)instances[0];
231+
232+
// .NET Workloads only shipped in 17.0 and later and we should only look at IDE based SKUs
233+
// such as community, professional, and enterprise.
234+
if (Version.TryParse(instance.GetInstallationVersion(), out Version version) &&
235+
version.Major >= 17 &&
236+
s_visualStudioProducts.Contains(instance.GetProduct().GetId()))
237+
{
238+
vsInstances.Add(instances[0]);
239+
}
232240
}
233241
}
242+
while (fetched > 0);
243+
244+
}
245+
catch (COMException e) when (e.ErrorCode == REGDB_E_CLASSNOTREG)
246+
{
247+
// Query API not registered, good indication there are no VS installations of 15.0 or later.
248+
// Other exceptions are passed through since that likely points to a real error.
234249
}
235-
while (fetched > 0);
236250

251+
return vsInstances;
237252
}
238-
catch (COMException e) when (e.ErrorCode == REGDB_E_CLASSNOTREG)
239-
{
240-
// Query API not registered, good indication there are no VS installations of 15.0 or later.
241-
// Other exceptions are passed through since that likely points to a real error.
242-
}
243-
244-
return vsInstances;
245253
}
246254
}
247255
}

src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/SuppressionFileHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static void GenerateSuppressionFile(ISuppressionEngine suppressionEngine,
3939
return;
4040
}
4141

42-
if (suppressionEngine.WriteSuppressionsToFile(suppressionOutputFile, preserveUnnecessarySuppressions).Count > 0)
42+
if (suppressionEngine.WriteSuppressionsToFile(suppressionOutputFile, preserveUnnecessarySuppressions).SuppressionFileUpdated)
4343
{
4444
log.LogMessage(MessageImportance.High,
4545
string.Format(CommonResources.WroteSuppressions, suppressionOutputFile));

src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility/Logging/ISuppressionEngine.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public interface ISuppressionEngine
5454
/// </summary>
5555
/// <param name="suppressionOutputFile">The path to the file to be written.</param>
5656
/// <param name="preserveUnnecessarySuppressions">If <see langword="true"/>, preserves unnecessary suppressions.</param>
57-
/// <returns>Returns the set of suppressions written.</returns>
58-
IReadOnlyCollection<Suppression> WriteSuppressionsToFile(string suppressionOutputFile, bool preserveUnnecessarySuppressions = false);
57+
/// <returns>Returns a boolean indicating whether the suppression file got updated and the set of suppressions written.</returns>
58+
(bool SuppressionFileUpdated, IReadOnlyCollection<Suppression> UpdatedSuppressions) WriteSuppressionsToFile(string suppressionOutputFile, bool preserveUnnecessarySuppressions = false);
5959
}
6060
}

0 commit comments

Comments
 (0)