-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With .NET 6 Preview6, build netstandard2.0 classlib failed with error: CSC : error CS8630: Invalid 'nullable' value: 'Enable' for C# 7.3. Please use language version '8.0' or greater. #3297
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Adding binary log via |
The project file has the following structure <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup> The default language version for “netstandard2.0” is 7.3 and that is not compatible with enable. Either the element needs to be removed or needs to be explicitly set to 8.0 or higher. Closing as the behavior for the SDK + Compiler is as expected given this project file structure. |
@NicoleWang001, @jaredpar, this is a template issue then. @dsplaisted who owns the netstandard classlib template? |
The tests don't crate netstandard version of the templates? I'll submit a fix here |
@Amy-Li03 have you followed this guidance when creating the multi-target framework project? dotnet/docs#25383 thanks |
@vlada-shubina We just want to use .NET framework designer in .NET core project, firstly create a WinForms project targeting .NET 6.0 by default, then in XXX.csproj file change TargetFramework from |
@Amy-Li03 please double check wtih dotnet/winforms for this case, I'm not sure, if it's supported. |
Repro steps:
Expected Result:
Classlib could be built successfully
Actual Result:
build netstandard2.0 classlib failed with error:
Note: It not repro with .NET 6 Preview5
Dotnet info:
.NET SDK (reflecting any global.json):
Version: 6.0.100-preview.6.21315.23
Commit: 8f09936962
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19043
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.100-preview.6.21315.23\
Host (useful for support):
Version: 6.0.0-preview.6.21306.1
Commit: 5b8e1780ad
.NET SDKs installed:
6.0.100-preview.5.21302.13 [C:\Program Files\dotnet\sdk]
6.0.100-preview.6.21315.23 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.0-preview.5.21301.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.0-preview.6.21306.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.0-preview.5.21301.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0-preview.6.21306.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.0-preview.5.21301.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.0-preview.6.21305.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
The text was updated successfully, but these errors were encountered: