Repository navigation
Check .NET Core Framework Version: .Net 10 upgrade and ASP.NET Core target - #1718
Open
JeremyCamplin wants to merge 1 commit into
Open
JeremyCamplin wants to merge 1 commit into
JeremyCamplin wants to merge 1 commit into
Conversation
…Net 10.0 and apply TargetVersion to the ASP.NET Core check
|
Review this PR in Hyponome for a side-by-side diff of the step-template JSON and any embedded scripts. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Noted while using this template that in the output it was duplicating rows.
On closer inspection, found these issues:
HKLM\SOFTWARE\Wow6432Node\Microsoft\Updates\.NET Coreand...\Updates\.NET, where each version has one key per architecture plus the hosting bundle key.TargetVersionignored for ASP.NET Core. That half of the script only tested whether the list was non-empty, so it passed as long as any ASP.NET Core entry existed.$_ -ge $targetVersionon strings, so"10.0.14" -ge "6.0"is$falseand .NET 10 runtimes are never matched, while"6.0.9" -ge "6.0.10"is$true.Results
<Program Files>\dotnet\shared\Microsoft.NETCore.Appand...\shared\Microsoft.AspNetCore.App, one folder per version, which is the same sourcedotnet --list-runtimesuses. No duplicates, no registry dependency, and no 32-bit registrations counted as usable runtimes.10.0>6.0,6.0.9<6.0.10, and a pre-release such as10.0.0-rc.1.25451.107is lower than10.0.0. A bare major such as8is treated as8.0.TargetVersionandExactrules as the .NET runtime check.TargetVersionfails fast with a clear message.Before
Target
6.0, Exactoff, ASP.NET Core checkon.ASP.NET Core versions are repeated, 8.0.2 is a 32-bit registry entry, and the installed x64 8.0.8 is missing:
What
dotnet --list-runtimesreports on that same server:On a second machine with .NET 10 installed (runtimes 6.0.36, 8.0.19, 8.0.32, 8.0.33, 10.0.11, 10.0.12, 10.0.14), the same parameters miss every .NET 10 runtime because of the string comparison:
After
Same parameters on the first server, from a runbook run of the updated template. The output now matches
dotnet --list-runtimes:Target
10.0on the same server:Target
6.0on the second machine, with .NET 10 now matched and ASP.NET Core read from the same source as the runtime:Also tested with Windows PowerShell 5.1 against a synthetic
dotnet\sharedtree covering .NET 10 ordering, pre-release ordering, exact matching, ASP.NET Core filtering, invalid and empty targets, and a missingdotnetfolder.Pre-requisites
Idshould be a GUID that is not00000000-0000-0000-0000-000000000000Idproperty (updating theIdwill break the Library sync functionality in Octopus).Versionshould be incremented, otherwise the integration with Octopus won't update the step template correctly$Metamust haveExportedAtandOctopusVersionupdated$LastModifiedByfield must be present, and (optionally) updated with the correct authorCategoryhas been created:{categoryname}.pngmust be present under thestep-templates/logosfolderswitchin thehumanizefunction ingulpfile.babel.jsmust have acasestatement corresponding to it