Skip to content

Commit 75d1bbf

Browse files
committed
Merge remote-tracking branch 'origin/main' into main-to-microbuild
2 parents d6be5cf + 00cdc91 commit 75d1bbf

File tree

5 files changed

+18
-11
lines changed

5 files changed

+18
-11
lines changed

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
1616
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1717
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
18+
<RestoreEnablePackagePruning>true</RestoreEnablePackagePruning>
1819

1920
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/apicompat/package-validation/overview -->
2021
<EnablePackageValidation>true</EnablePackageValidation>

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<!-- Put repo-specific PackageVersion items in this group. -->
1212
</ItemGroup>
1313
<ItemGroup Label="Library.Template">
14-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
14+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
1515
<PackageVersion Include="Microsoft.VisualStudio.Internal.MicroBuild.NonShipping" Version="$(MicroBuildVersion)" />
1616
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
1717
<PackageVersion Include="xunit.v3" Version="3.2.0" />

Expand-Template.ps1

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@ try {
108108
git mv src/VSInsertionMetadata/Library.VSInsertionMetadata.proj "src/VSInsertionMetadata/$LibraryName.VSInsertionMetadata.proj"
109109
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
110110

111+
# Update project reference in test project. Add before removal to keep the same ItemGroup in place.
112+
dotnet add "test/$LibraryName.Tests" reference "src/$LibraryName"
113+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
114+
dotnet remove "test/$LibraryName.Tests" reference src/Library/Library.csproj
115+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
116+
git add "test/$LibraryName.Tests/$LibraryName.Tests.csproj"
117+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
118+
111119
# Refresh solution file both to update paths and give the projects unique GUIDs
112120
dotnet sln remove src/Library/Library.csproj
113121
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
@@ -120,12 +128,10 @@ try {
120128
git add "$LibraryName.slnx"
121129
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
122130

123-
# Update project reference in test project. Add before removal to keep the same ItemGroup in place.
124-
dotnet add "test/$LibraryName.Tests" reference "src/$LibraryName"
131+
# Establish a new strong-name key
132+
& $sn.Path -k 2048 strongname.snk
125133
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
126-
dotnet remove "test/$LibraryName.Tests" reference src/Library/Library.csproj
127-
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
128-
git add "test/$LibraryName.Tests/$LibraryName.Tests.csproj"
134+
git add strongname.snk
129135
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
130136

131137
# Replace placeholders in source files

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "9.0.306",
3+
"version": "10.0.100",
44
"rollForward": "patch",
55
"allowPrerelease": false
66
},

tools/Install-DotNetSdk.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ if ($InstallLocality -eq 'machine') {
197197
$restartRequired = $false
198198
$sdks |% {
199199
if ($_.Version) { $version = $_.Version } else { $version = $_.Channel }
200-
if ($PSCmdlet.ShouldProcess(".NET SDK $_", "Install")) {
200+
if ($PSCmdlet.ShouldProcess(".NET SDK $version ($arch)", "Install")) {
201201
Install-DotNet -Version $version -Architecture $arch
202202
$restartRequired = $restartRequired -or ($LASTEXITCODE -eq 3010)
203203

@@ -281,10 +281,10 @@ if ($IncludeX86) {
281281
}
282282

283283
if ($IsMacOS -or $IsLinux) {
284-
$DownloadUri = "https://raw.githubusercontent.com/dotnet/install-scripts/0b09de9bc136cacb5f849a6957ebd4062173c148/src/dotnet-install.sh"
284+
$DownloadUri = "https://raw.githubusercontent.com/dotnet/install-scripts/a3fbd0fd625032bac207f1f590e5353fe26faa59/src/dotnet-install.sh"
285285
$DotNetInstallScriptPath = "$DotNetInstallScriptRoot/dotnet-install.sh"
286286
} else {
287-
$DownloadUri = "https://raw.githubusercontent.com/dotnet/install-scripts/0b09de9bc136cacb5f849a6957ebd4062173c148/src/dotnet-install.ps1"
287+
$DownloadUri = "https://raw.githubusercontent.com/dotnet/install-scripts/a3fbd0fd625032bac207f1f590e5353fe26faa59/src/dotnet-install.ps1"
288288
$DotNetInstallScriptPath = "$DotNetInstallScriptRoot/dotnet-install.ps1"
289289
}
290290

@@ -306,7 +306,7 @@ $global:LASTEXITCODE = 0
306306
$sdks |% {
307307
if ($_.Version) { $parameters = '-Version', $_.Version } else { $parameters = '-Channel', $_.Channel }
308308

309-
if ($PSCmdlet.ShouldProcess(".NET SDK $_", "Install")) {
309+
if ($PSCmdlet.ShouldProcess(".NET SDK $_ ($arch)", "Install")) {
310310
$anythingInstalled = $true
311311
Invoke-Expression -Command "$DotNetInstallScriptPathExpression $parameters -Architecture $arch -InstallDir $DotNetInstallDir $switches"
312312

0 commit comments

Comments
 (0)