Tool to install/uninstall Microsoft .NET Frameworks references assemblies.
The references assemblies are downloaded from the NuGet package Microsoft.NETFramework.ReferenceAssemblies and copy to the Reference Assemblies Microsoft folder.
dotnet tool install --global NETFrameworkTool
The command -l
or --list
is used to show the .NET Framework versions installed and available.
NETFrameworkTool --list
Example output:
NETFrameworkTool available:
.NETFramework 4.0 Installed
.NETFramework 4.5 Installed
.NETFramework 4.5.1
.NETFramework 4.5.2
.NETFramework 4.6 Installed
.NETFramework 4.6.1
.NETFramework 4.7 Installed
.NETFramework 4.7.2 Installed
.NETFramework 4.8 Installed
The command -n
or --net
is used to specify the .NET Framework version to install/uninstall.
NETFrameworkTool --net 4.0
The command -i
or --install
is used to install the .NET Framework version. (Administrator Permission Required)
NETFrameworkTool --net 4.0 --install
The command -u
or --uninstall
is used to uninstall the .NET Framework version. (Administrator Permission Required)
NETFrameworkTool --net 4.0 --uninstall
The command -f
or --force
is used to force to reinstall the .NET Framework version. (Administrator Permission Required)
NETFrameworkTool --net 4.0 --install --force
The command -help
is used to show the help.
NETFrameworkTool --help
The windows-2022
does not have the .NET Framework 4.0 and 4.5 installed by default.
You can use the NETFrameworkTool
to install the .NET Framework 4.0 and 4.5.
To use the NETFrameworkTool
in a GitHub Actions workflow, you can use the following example with setup-dotnet:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
- run: dotnet tool install --global NETFrameworkTool
- run: NETFrameworkTool --net 4.0 --install
- run: NETFrameworkTool --net 4.5 --install
This project is licensed under the MIT License.
Do you like this project? Please star this project on GitHub!