Skip to content
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

do not enable nullable on netstandard2.0 #3299

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
<RootNamespace Condition="'$(name)' != '$(name{-VALUE-FORMS-}safe_namespace)'">Company.ClassLibrary1</RootNamespace>
<LangVersion Condition="'$(langVersion)' != ''">$(ProjectLanguageVersion)</LangVersion>
<Nullable Condition="'$(Nullable)' == 'true'">enable</Nullable>
<Nullable Condition="('$(Nullable)' == 'true') AND ('$(Framework)' != 'netstandard2.0')">enable</Nullable>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
</PropertyGroup>

Expand Down
8 changes: 7 additions & 1 deletion test/dotnet-new3.UnitTests/CommonTemplatesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ public CommonTemplatesTests(SharedHomeDirectory fixture, ITestOutputHelper log)
[InlineData("Class Library", "classlib", "C#", "netcoreapp2.1")]
[InlineData("Class Library", "classlib", "F#", "netcoreapp2.1")]
[InlineData("Class Library", "classlib", "VB", "netcoreapp2.1")]
[InlineData("Class Library", "classlib", "C#", "netstandard2.0")]
[InlineData("Class Library", "classlib", "VB", "netstandard2.0")]
[InlineData("Class Library", "classlib", "F#", "netstandard2.0")]

[InlineData("Simple Console Application", "app")]
[InlineData("Simple Console Application", "app", "C#")]
Expand Down Expand Up @@ -167,6 +170,9 @@ Determining projects to restore\.\.\.
[InlineData("Class Library", "classlib", "C#", "netcoreapp2.1")]
[InlineData("Class Library", "classlib", "F#", "netcoreapp2.1")]
[InlineData("Class Library", "classlib", "VB", "netcoreapp2.1")]
[InlineData("Class Library", "classlib", "C#", "netstandard2.0")]
[InlineData("Class Library", "classlib", "VB", "netstandard2.0")]
[InlineData("Class Library", "classlib", "F#", "netstandard2.0")]

[InlineData("Simple Console Application", "app")]
[InlineData("Simple Console Application", "app", "C#")]
Expand Down Expand Up @@ -306,7 +312,7 @@ public void SetPropertiesByDefault(string propertyName, string? propertyValue, s
}

[Theory]
//unset nullable
//unset nullable
[InlineData("Nullable", null, "--nullable", "false", "Simple Console Application", "app", null, null)]
[InlineData("Nullable", null, "--nullable", "false", "Class Library", "classlib", null, null)]

Expand Down