Skip to content

Instantly share code, notes, and snippets.

@pekspro
pekspro / Net7toNet8.ps1
Last active February 14, 2024 07:37
Net7toNet8.ps1
# This script updates all .csproj-files from .NET 7 to .NET 8. It updates TargetFramework and
# all Microsoft- and System-packages.
# Put this script in the folder that contains the .csproj-files and then run it. All .csproj-files,
# including in subdirectories, will be converted.
$configFiles = Get-ChildItem . *.csproj -rec
foreach ($file in $configFiles)
{
# This script updates all .csproj-files from .NET 6 to .NET 7. It updates TargetFramework and
# all Microsoft- and System-packages.
# Put this script in the folder that contains the .csproj-files and then run it. All .csproj-files,
# including in subdirectories, will be converted.
$configFiles = Get-ChildItem . *.csproj -rec
foreach ($file in $configFiles)
{
@pekspro
pekspro / Net5ToNet6.ps1
Last active April 11, 2023 07:26
Updates all .csproj-files from .NET 5 to .NET 6 RC and reverse
# This script updates all .csproj-files from .NET 5 to .NET 6 preview. It updates TargetFramework and
# all Microsoft- and System-packages.
# Put this script in the folder that contains the .csproj-files and then run it. All .csproj-files,
# including in subdirectories, will be converted.
$configFiles = Get-ChildItem . *.csproj -rec
foreach ($file in $configFiles)
{