How to delete DNX and ASP. netdnx of earlier versions after asp. NET 5 is upgraded
After ASP. NET 5 is upgraded, the DNX of the old version will not be deleted. to delete the DNX of the old version, run the following command. Before that, we will introduce the DNX architecture and running principle.
DNX is the core of ASP. NET program running. It follows the following two principles:
- DNX should be self-contained. DNX can only know which Core CLR package to use after resolving the application dependency tree. Therefore, DNX cannot load any CLR before obtaining the resolution tree, except for the Roslyn compiler.
- Dependency Injection (DI) runs through the entire system stack. DI is a core part of DNX, and all the class libraries on DNX are built on DI.
The hierarchical architecture of the DNX execution environment is as follows:
After ASP. NET 5 is upgraded, there are four simple steps to delete the DNX of the old version:
First open CMD or Powershell
1. EnterDnvmCheck whether the command hasUninstall
2. If not, upgrade dnvm first.
Dnvm update-self
3. If uninstall exists, run the following command:
Dnvm list
The results are as follows:
Active Version Runtime Architecture OperatingSystem Alias------ ------- ------- ------------ --------------- ----- 1.0.0-beta4 coreclr x64 win 1.0.0-beta4 coreclr x86 win 1.0.0-beta5 coreclr x64 win 1.0.0-beta5 coreclr x86 win 1.0.0-rc1-final clr x64 win * 1.0.0-rc1-final clr x86 win default 1.0.0-rc1-final coreclr x64 win 1.0.0-rc1-final coreclr x86 win
Note that the Version Runtime Architecture fields in the result
4. If you want to delete a version, you can use a statement similar to the following:
Dnvm uninstall 1.0.0-beta5-arch x86-runtime coreclr
Note:Dnvm uninstall [version]-arch [architecture]-runtime [runtime]