question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When targeting to multiple SDKs, winforms project build failed with error: CSC : error CS8630: Invalid 'nullable' value: 'Enable' for C# 7.3. Please use language version '8.0' or greater.

See original GitHub issue
  • .NET Core Version: .NET SDK 6.0.100

  • More info:

  1. When targeting to multiple SDKs with net5.0-windows;net48, this issue also repro.
  2. When targeting to multiple SDKs with netcoreapp3.1;net48, this issue doesn’t repro.
  • Have you experienced this same bug with .NET Framework?: No

Actual behavior: The WinForms project build failed with error: CSC : error CS8630: Invalid ‘nullable’ value: ‘Enable’ for C# 7.3. Please use language version ‘8.0’ or greater. image

Expected behavior: The WinForms project could be built successfully

Minimal repro:

  1. Create a WinForms .NET core project
  2. Edit .csproj file and change the SDK in <TargetFramework> node from <TargetFramework>net6.0-windows</TargetFramework> to <TargetFrameworks>net6.0-windows;net48</TargetFrameworks>
  3. Reload this project
  4. Build this project

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

Invalid 'nullable' value - 'Enable' for C# 7.3
In my case, I ran into this problem with Visual Studio 2022 when I changed the target framework from .NET Standard 2.1 to...
Read more >
Invalid Nullable Value - Enable for C# 7.3 - Attach to Process
Right-click YourProject, click Properties · Click Build if it's not already selected · Change Configuration to All Configurations · Click Advanced.
Read more >
Using C# 8 and Nullable Reference Types in .NET Framework
Enabling Nullable Reference Types:​​ The next step is to turn on the nullable reference types feature. If you are using the modern project...
Read more >
enable for c# 7.3 please use language version 8.0 or greater
Use language version and greater Issue Description .NET build (MSBuild or Visual Studio) gives below or similar format of the error.
Read more >
C# 8.0 nullable references: supporting older runtimes
In this post, I'll show how you can use C# 8.0's nullable reference features on code that needs to target versions of ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found