You cannot switch from .net 5 (basically .net core) to .net framework 4.8 with the framework version drop down in the project properties. The easiest way to convert to .net framework 4.8 is to create a new project .net framework 4.8 project and copy the files from the .net 5 project into it
using older .net framework
Good morning
I have an old project which uses WF under .net framework 4.8
I use VS 2019 to work with it
Now I need to make a test and I created a very basic console application to call a WF workflow
My default framework is 5.0 on the project . I see that WF doesn't work well with both .net core 3.0 and framework 5.0
I need to use the same framework as the old project, which , as I said, is 4.8.
If I go the the VS 2019 info tab I can see that , for both project, old and new, the framework is 4.8.04.084
But when I try to set, in the new project project's settings , the framework to 4.8, as is in the old one , I just have 5.0, down to .net core 1.0
If I want to use 4.8 it seems I should install it .
Then I ask myself : how does the old project compile well with .net 4.8 ?
This framework must be available somewhere on my pc : why doesn't VS find it, when I try to set it in the new project ?
Developer technologies .NET .NET Runtime
5 answers
Sort by: Most helpful
-
-
Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
2022-05-31T14:55:55.543+00:00 Because the project files and template code are in a completely different format, visual studio does not support downgrading a .net core project to the 4.* framework. To upgrade a 4.* project to ,net core you use a migration tool.
Note: .net core can not call 4.8 libraries. Only .netstandard libraries can be shared between 4.* and core.
-
leo del ciello 66 Reputation points
2022-05-31T14:59:18+00:00 When I'm creating the project, , in the "destination framework" drop down, iI can only choose between 3.1 core or 5.0.
What leaves me baffled is that using the same ide vs 2019 I can open some old project and see that an older framework has been loaded. -
Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
2022-05-31T19:13:08.07+00:00 You need install the visual studio workload for the old framework because it is optional. Run the installer and you will find the check box for 4.8 projects.
-
Jiachen Li-MSFT 34,221 Reputation points Microsoft External Staff
2022-06-01T08:41:18.127+00:00 Hi @leo del ciello ,
If you want to create .NET framework 4.8 projects, both .NET Framework4.8 SDK and .NET Framework4.8 Targeting Pack are necessary.
Then choose App(.Net Framework) when creating a new project.
Best Regards.
Jiachen Li----------
If the answer is helpful, please click "Accept Answer" and upvote it.
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.