简体   繁体   中英

Why can't I uninstall .NET Framework 4.8?

I wanted to get System.ValueTuple 4.5 to work in a build on our TFS server. I got an answer to my question Is it possible to get System.ValueTuple 4.5.0 onto a TFS 2015 server?

I installed .NET Framework 4.8 on the Windows Server 2012 R2 server, but due to other issues found that I'm going to have to go to .NET Framework 4.7.2. I tried to install .NET 4.7.2, but that failed, saying that I cannot install a .NET Framework less than 4.8.

Next, I tried to uninstall .NET 4.8, but it doesn't show up in Add/Remove Programs on the build server. Why is that? How do I get .NET 4.8 uninstalled, so I can get .NET 4.7.2 installed?

In Windows 8 and above, the .NET Framework is an operating system component and cannot be independently uninstalled. In general, you should not uninstall any versions of the .NET Framework that are installed on your computer, because an application you use may depend on a specific version of the .NET Framework.

https://docs.microsoft.com/en-us/dotnet/framework/install/troubleshoot-blocked-installations-and-uninstallations

Try the following steps to see whether you can restore System.ValueTuple 4.5 package in your TFS build:

  1. Go to your build server, open your project in VS, and try to restore System.ValueTuple 4.5 package from Package Manager, to see whether you can get it restored:

    Install-Package System.ValueTuple -Version 4.4.0

  2. Delete packages folder in your project if you have.

  3. Make sure you have the following item in the packages.config file:

    <package id="System.ValueTuple" version="4.5.0" targetFramework="net452" />

  4. This package requires NuGet 2.12 or higher. When using NuGet 3.x this package requires at least version 3.4.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM