Skip to content

Commit 404ef70

Browse files
authored
Merge branch 'main' into merge/release/9.0-to-main
2 parents d11493f + bc119fc commit 404ef70

File tree

34 files changed

+747
-320
lines changed

34 files changed

+747
-320
lines changed

NuGet.config

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,15 @@
44
<clear />
55
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
66
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
7+
<add key="dotnet10" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10/nuget/v3/index.json" />
8+
<add key="dotnet10-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10-transport/nuget/v3/index.json" />
79
<add key="dotnet9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" />
810
<add key="dotnet9-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9-transport/nuget/v3/index.json" />
911
<add key="dotnet8" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json" />
10-
<add key="dotnet7" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json" />
1112
<add key="dotnet8-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8-transport/nuget/v3/index.json" />
1213
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
13-
<!-- Used for the SiteExtension bits that are included in the 8.0 build -->
14-
<add key="dotnet31-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json" />
15-
<add key="dotnet5-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json" />
14+
<!-- Used for the SiteExtension bits -->
1615
<add key="dotnet6-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6-transport/nuget/v3/index.json" />
17-
<add key="dotnet7-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7-transport/nuget/v3/index.json" />
1816
<!-- Used for the Rich Navigation indexing task -->
1917
<add key="richnav" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-buildservices/nuget/v3/index.json" />
2018
</packageSources>

eng/Npm.Workspace.nodeproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
<Message Text="Building NPM packages..." Importance="high" />
3838

39-
<Exec Condition="'$(ContinuousIntegrationBuild)' == 'true'"
39+
<Exec
4040
Command="node $(MSBuildThisFileDirectory)scripts/npm/pack-workspace.mjs --update-versions $(RepoRoot)package.json $(PackageVersion) $(PackageOutputPath) $(IntermediateOutputPath)"
4141
EnvironmentVariables="$(_NpmAdditionalEnvironmentVariables)" />
4242

@@ -58,6 +58,8 @@
5858
</PropertyGroup>
5959
<Message Text="Packing NPM packages..." Importance="high" />
6060
<MakeDir Directories="$(PackageOutputPath)" Condition="!Exists('$(PackageOutputPath)')" />
61+
<MakeDir Directories="$(IntermediateOutputPath)" Condition="!Exists('$(IntermediateOutputPath)')" />
62+
6163
<Exec
6264
Command="node $(MSBuildThisFileDirectory)scripts/npm/pack-workspace.mjs --create-packages $(RepoRoot)package.json $(PackageVersion) $(PackageOutputPath) $(IntermediateOutputPath)"
6365
EnvironmentVariables="$(_NpmAdditionalEnvironmentVariables)" />

eng/Version.Details.xml

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

eng/Versions.props

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

eng/common/SetupNugetSources.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ if ($dotnet31Source -ne $null) {
157157
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password
158158
}
159159

160-
$dotnetVersions = @('5','6','7','8')
160+
$dotnetVersions = @('5','6','7','8','9')
161161

162162
foreach ($dotnetVersion in $dotnetVersions) {
163163
$feedPrefix = "dotnet" + $dotnetVersion;

eng/common/SetupNugetSources.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ if [ "$?" == "0" ]; then
9999
PackageSources+=('dotnet3.1-internal-transport')
100100
fi
101101

102-
DotNetVersions=('5' '6' '7' '8')
102+
DotNetVersions=('5' '6' '7' '8' '9')
103103

104104
for DotNetVersion in ${DotNetVersions[@]} ; do
105105
FeedPrefix="dotnet${DotNetVersion}";

eng/test-configuration.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
{"testName": {"contains": "CanLaunchPhotinoWebViewAndClickButton"}},
1212
{"testName": {"contains": "CheckInvalidHostingModelParameter"}},
1313
{"testName": {"contains": "CanSendAndReceiveUserMessagesFromMultipleConnectionsWithSameUser"}},
14+
{"testName": {"contains": "POST_Expect100Continue_Get100Continue"}},
1415
{"testAssembly": {"contains": "IIS"}},
1516
{"testAssembly": {"contains": "Template"}},
1617
{"failureMessage": {"contains":"(Site is started but no worker process found)"}},
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
5+
using System.Linq;
6+
using System.Text.Json;
7+
using System.Threading;
8+
using Microsoft.Build.Framework;
9+
using Microsoft.Build.Utilities;
10+
11+
namespace RepoTasks;
12+
13+
/// <summary>
14+
/// Generates the test HTTPs certificate used by the template tests
15+
/// </summary>
16+
public class GenerateTestDevCert : Task
17+
{
18+
[Required]
19+
public string CertificatePath { get; private set; }
20+
21+
public override bool Execute()
22+
{
23+
Mutex mutex = null;
24+
try
25+
{
26+
// MSBuild will potentially invoke this task in parallel across different subprocesses/nodes.
27+
// The build is configured to generate the certificate in a single location, but multiple projects
28+
// import the same targets that will use this task, which will result in multiple calls.
29+
// To avoid issues where we try to generate multiple certificates on the same location, we wrap the
30+
// usage in a named mutex which guarantees that only one instance will run at a time.
31+
mutex = new(initiallyOwned: true, "Global\\GenerateTestDevCert", out var createdNew);
32+
if (!createdNew)
33+
{
34+
// The mutex already exists, wait for it to be released.
35+
mutex.WaitOne();
36+
}
37+
38+
if (File.Exists(CertificatePath))
39+
{
40+
Log.LogMessage(MessageImportance.Normal, $"A test certificate already exists at {CertificatePath}");
41+
return true;
42+
}
43+
44+
var cert = DevelopmentCertificate.Create(CertificatePath);
45+
46+
var devCertJsonFile = Path.ChangeExtension(CertificatePath, ".json");
47+
var devCertJson = new CertificateInfo
48+
{
49+
Password = cert.CertificatePassword,
50+
Thumbprint = cert.CertificateThumbprint
51+
};
52+
53+
using var file = File.OpenWrite(devCertJsonFile);
54+
file.SetLength(0);
55+
JsonSerializer.Serialize(file, devCertJson);
56+
}
57+
catch (Exception e)
58+
{
59+
Log.LogErrorFromException(e, showStackTrace: true);
60+
}
61+
finally
62+
{
63+
mutex.ReleaseMutex();
64+
}
65+
66+
return !Log.HasLoggedErrors;
67+
}
68+
69+
private class CertificateInfo
70+
{
71+
public string Password { get; set; }
72+
public string Thumbprint { get; set; }
73+
}
74+
}

eng/tools/RepoTasks/RepoTasks.csproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@
2222
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="$(MicrosoftExtensionsDependencyModelVersion)" />
2323
</ItemGroup>
2424

25+
<ItemGroup Condition="'$(TargetFramework)' != 'net472'">
26+
<Compile Include="$(SharedSourceRoot)CertificateGeneration\**\*.cs" LinkBase="shared\CertificateGeneration" />
27+
</ItemGroup>
28+
29+
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
30+
<Compile Remove="GenerateTestDevCert.cs" />
31+
<Compile Remove="shared\CertificateGeneration\*.cs" />
32+
</ItemGroup>
33+
2534
<ItemGroup Condition="'$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)'">
2635
<PackageReference Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildFrameworkVersion)" />
2736
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildTasksCoreVersion)" />
@@ -46,4 +55,5 @@
4655
<HintPath>$(WiXSdkPath)\Microsoft.Deployment.WindowsInstaller.Package.dll</HintPath>
4756
</Reference>
4857
</ItemGroup>
58+
4959
</Project>

eng/tools/RepoTasks/RepoTasks.tasks

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
<UsingTask TaskName="RepoTasks.GenerateSharedFrameworkDepsFile" AssemblyFile="$(_RepoTaskAssembly)" />
1111
<UsingTask TaskName="RepoTasks.CreateFrameworkListFile" AssemblyFile="$(_RepoTaskAssembly)" />
1212
<UsingTask TaskName="RepoTasks.RemoveSharedFrameworkDependencies" AssemblyFile="$(_RepoTaskAssembly)" />
13+
<UsingTask TaskName="RepoTasks.GenerateTestDevCert" AssemblyFile="$(_RepoTaskAssembly)" />
1314
<UsingTask TaskName="DownloadFile" AssemblyFile="$(ArcadeSdkBuildTasksAssembly)" />
1415
</Project>

0 commit comments

Comments
 (0)