.Net 4.8.1 app doesn't start because Windows says .Net 4.8.1 is not installed

Jorge Silva 20 Reputation points
2024-01-22T16:12:53.0333333+00:00

We have an app that was built to be run by .Net 4.8.1 x86 . This app is installed in a Windows Server 2022 Datacenter Azure Edition. When we launch the app, a message box is shown by the OS, saying: "This application requires one of the following versions of the .NET Framework: .NETFramework,Version=v4.8.1 Do you want to install this .NET Framework version now? The Server Manager states that .Net 4.8.1 is already installed, but anyway I clicked the button on that message box, that directed me to the Microsoft downloads site, where I downloaded the setup, and then installed it. The setup app goes all the way through and in the end it says: "Installation is complete. .NET Framework 4.8.1 has been installed." Still, always the same error message box appears when I try again to run the app. The app initially was .Net 4.6.2, and on that framework version, it ran with no issues. When it was still in .Net 4.6.2, we had the following line in the appConfig file:

    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />

Of course now it says:

    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8.1" />

Can you help us on this issue? I ran out of ideas, and as it's a production server, I don't want to mess around with it too much.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,734 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,812 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,750 questions
{count} votes

Accepted answer
  1. Jiale Xue - MSFT 43,791 Reputation points Microsoft Vendor
    2024-01-24T01:11:46.48+00:00

    Hi @Jorge Silva , Welcome to Microsoft Q&A,

    Your issue has been confirmed as a known behavior.

    It will extend applicability to all existing Server 2022 SKUs in an upcoming release. The specific question link is:https://developercommunity.visualstudio.com/t/NET-Framework-481-installation-fails/10228681?space=21&q=remove+additional+files+false+on+linux&entry=problem

    Best Regards,

    Jiale


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".  Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


2 additional answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.