For questions specific to the usage and features of version 4.8 of Microsoft's .Net framework.
Questions tagged [.net-4.8]
999 questions
59
votes
11 answers
Visual Studio Can't Target .NET Framework 4.8
I'm having some issues creating a project that targets .NET Framework 4.8. I am using Visual Studio 2019, upgraded to version 16.2.5. I have also installed the .NET Framework 4.8 Developer Pack. From the Visual Studio Installer, I don't see any…

ElliotSchmelliot
- 7,322
- 4
- 41
- 64
37
votes
2 answers
Project 'ClassLibrary1.csproj' targets 'netstandard2.1'. It cannot be referenced by a project that targets '.NETFramework,Version=v4.8'
I have some class library projects in targets netstandard2.1.
When I referenced that to my WPF project in target .NET Framework v4.8, On building time I get an error:
Severity Code Description Project File Line Suppression State
Error …

Behzad
- 3,502
- 4
- 36
- 63
25
votes
3 answers
Migrate .NET Framework 4.8 to .NET 5
Recently Microsoft has release .NET 5. If we want to upgrade .NET Framework 4.8 to .net 5 then how can we accomplish this task.
Please Note :
I had already upgrade Visual Studio 18.2 with all latest
component and .net Framework 5. But in project…

Dave Kapildev
- 471
- 1
- 7
- 18
21
votes
1 answer
Why .NET 4.8 is recommended version despite 4.8.1 latest version available
Looking at the available .NET Frameworks, 4.8.1 is the latest. However 4.8 is recommended by Microsoft here. I am curious why is that. Is 4.8.1 in beta or something? I couldn't find any information about that.

whoami
- 1,689
- 3
- 22
- 45
19
votes
2 answers
NETSDK1135 SupportedOSPlatformVersion 10.0.19041.0 cannot be higher than TargetPlatformVersion 7.0
I am trying to convert a .NET Framework WPF app to .NET 5
I ran https://github.com/dotnet/try-convert, and removed some incompatible DLL refs.
Now, when I try to compile, I am presented with
NETSDK1135 SupportedOSPlatformVersion 10.0.19041.0 cannot…

Julien
- 212
- 1
- 18
- 53
19
votes
5 answers
How to upgrade all solution projects .Net framework 4.5.1 to 4.8 Visual Studio 2019
I have a solution in Visual Studio 2019 with many C # projects. I need to retarget all of the projects from the .NET Framework 4.5.1 to 4.8. Is it possible to change target at once or do I have to do it separately with every single one of them?
PS:…

mike
- 1,202
- 1
- 7
- 20
18
votes
1 answer
How to change .NET Framework to .NET Standard/Core in Visual Studio?
I have a solution in C# in Visual Studios. It was first created in .NET Framework. I want to convert the project to .NET Standard/Core. If I go into project --> properties I see the attached screen, where Target Framework is .NET Framework. How am I…

ENV
- 877
- 2
- 10
- 32
16
votes
3 answers
Net Framework 4.8 EF6 EDMX T4 Error _generationEnvironment is NULL
This started with an EDMX suddenly not generating class files. The .context.cs file contains the class declaration like
public virtual DbSet myTable { get; set; }
but the actual class files are not being generated. Both .tt files are…

Serexx
- 1,232
- 1
- 15
- 32
15
votes
1 answer
Rounding of last digit changes after Windows .NET update
After Windows has updated, some calculated values have changed in the last digit, e.g. from -0.0776529085243926 to -0.0776529085243925. The change is always down by one and both even and odd numbers are affected. This seems to be related to…

Jaroslav K
- 327
- 1
- 13
13
votes
2 answers
Create a Linux-based Docker file for .NET Framework project
I have an ASP.Net Framework 4.8 project. I want to create a Linux-based Docker file for this project, but I can't find a Linux-based image to use as a base image in my Docker file for .NET Framework. How can I create a Docker file for this?

Hamed Hajiloo
- 964
- 1
- 10
- 31
13
votes
1 answer
Enabling TLS 1.2 without changing code in .NET
I have .NET 4.5.2 application that is using SmtpClient to send emails. The application is installed on Windows 2012 R2 server. When I disable TLS 1 and TLS 1.1 and enable only TLS 1.2, the application stops sending mails. I think that's because .NET…

LP13
- 30,567
- 53
- 217
- 400
11
votes
6 answers
create unit tests for .net 6.0
I created a .Net 6 class library and now I am trying to create a test project.
a .net 6 test project is not available. Online I found the information to use .Net Framework or .Net core in order to test.
I created a .Net Framework 4.8 test project an…

julian bechtold
- 1,875
- 2
- 19
- 49
11
votes
1 answer
Difference in lambda expressions between full .NET framework and .NET Core
Is there a difference in the declaration of lambda expressions between the .NET Framework and .NET Core?
The following expressions compiles in .NET Core:
var lastShift = timeline.Appointments
…

BendEg
- 20,098
- 17
- 57
- 131
11
votes
3 answers
Nullable reference types in .NET Framework projects not working with IntelliSense
When I create a new Console App (.NET Framework 4.8), and try to use C# 8's nullable reference types, I see the following:
And, I get this warning in my build output:
warning CS8632: The annotation for nullable reference types should only be used…

Rudey
- 4,717
- 4
- 42
- 84
10
votes
1 answer
Web API as a windows service
So I'm creating a new .Net Framework 4.8 Web API in Visual Studio 2019 and I'm wanting to know how to create the API as a windows service? I can't seem to find any examples or online resources to do so. I can run the API locally in VS and it opens…

user616
- 783
- 4
- 18
- 44