E
E
Evgeny Ivanov2021-08-05 10:35:31
.NET
Evgeny Ivanov, 2021-08-05 10:35:31

How and to which version to downgrade the .NET version in a C# project?

On the rights of absurdity, feints with ears and not scientific interest.

Project in C#. From the MaterialDesignThemes and System.Data.SQLite packages.
Everything works on .NET 4.7.

It suddenly turned out that there is no .NET 4.7 or higher on the computer where the program will be executed.
And due to the budgetary organization / small salaries / limitations / "do not let go and prohibit" the framework or other system software on a budget computer (let's call it that) cannot be installed.

I ran the command
dir %WINDIR%\Microsoft.Net\Framework\v*
610b918a2a118506871121.jpeg
In the C# project (Visual Studio) I changed - Properties - Target working environment - .NET Framework 4.
Restarted, edited, rebuilt. Removed MaterialDesignThemes because seems to require .NET Framework 4.5 (maybe I'm wrong). Everything works on my computer.

I launched a budget computer - it does not start, it says install .NET Framework 4.
I did not understand. It's there in the picture above.
610b93f21b4fe464885892.jpeg

Decided to downgrade to 3.5.
There were errors in the project and the studio began to issue an exception on
InitializeComponent();

How and to what version to downgrade the .NET version in a C# project?
Is there another solution (probably not, but suddenly) - a "portable" framework?
(by the way, this was promised at a speech on .NET, like in version 5)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-08-07
@vabka

If you don't need to support Windows 7 and 8, then switch to .NET 5 and use self contained + single file
If you need to support Windows 7, then switch to .NET 4.6 If you
need to support Windows XP, then switch to .NET 3.5
support for older versions of Windows)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question