Skip to content

Scripts to update to .NET prerelease version - #12284

Merged
Travis Plunk (TravisEz13) merged 6 commits into
PowerShell:masterfrom
adityapatwardhan:DotNet5p2
Apr 15, 2020
Merged

Travis Plunk (TravisEz13) merged 6 commits into
PowerShell:masterfrom
adityapatwardhan:DotNet5p2

Conversation

@adityapatwardhan

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) commented Apr 8, 2020 •

Copy link
Copy Markdown
Member

PR Summary

Script to help to move to the next preview version of .NET. The version of .NET is in DotnetRuntimeMetadata.json.
The script is to be used by developer who wants to move the code base to the new .NET preview. The script will update the global.json and all the other csproj files which need to be updated.

PR Context

PR Checklist

Comment thread nuget.config Resolved
Comment thread UpdateDotnetRuntime.ps1 Resolved
@iSazonov Ilya (iSazonov) added the WG-Maintainers-Build specific to affecting the build label Apr 9, 2020
@iSazonov Ilya (iSazonov) added this to the 7.1.0-preview.2 milestone Apr 9, 2020
@iSazonov Ilya (iSazonov) added CL-Tools Indicates that a PR should be marked as a tools change in the Change Log and removed WG-Maintainers-Build specific to affecting the build labels Apr 9, 2020

@daxian-dbw Dongbo Wang (daxian-dbw) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aditya Patwardhan (@adityapatwardhan) Can you please update the PR description to include some information about what the script does and the context of why we need it?

Comment thread UpdateDotnetRuntime.ps1
@@ -0,0 +1,130 @@
[CmdletBinding()]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this file should be put in tools folder?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.. I can move it.

@adityapatwardhan

Copy link
Copy Markdown
Member Author

Dongbo Wang (@daxian-dbw) Ping..

Comment thread tools/UpdateDotnetRuntime.ps1 Resolved
Comment thread tools/UpdateDotnetRuntime.ps1 Resolved
$stringToReplace = "<PackageReference Include=`"$($v.Name)`" Version=`"$($v.Version)`" />"
$newString = "<PackageReference Include=`"$($v.Name)`" Version=`"$($v.NewVersion)`" />"

$fileContent = $fileContent -replace $stringToReplace, $newString

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is doing a regex replace... maybe it's safer to using .replace()

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regex replace is turning out to be a bit complicated. Keeping it as is. The intention is to create a PR after the script does the changes. So there will be a code review as a safety net.

@ghost ghost added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Apr 14, 2020
@ghost ghost removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Apr 15, 2020
@adityapatwardhan

Copy link
Copy Markdown
Member Author

Travis Plunk (@TravisEz13) please re-review

@iSazonov

Copy link
Copy Markdown
Collaborator

/cc Christoph Bergmeister (@bergmeister) for information.

@ghost

Copy link
Copy Markdown

🎉v7.1.0-preview.2 has been released which incorporates this pull request.:tada:

Handy links:

Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-Tools Indicates that a PR should be marked as a tools change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants