From f70eef0db1b6152dd3fa5c88147c28c238adc61b Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Thu, 15 Aug 2019 08:27:39 -0700 Subject: [PATCH 1/3] I don't know how to write debug asserts (#13134) --- src/Servers/Kestrel/Core/src/Internal/Http2/Http2Stream.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Stream.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Stream.cs index b6de8ab79d..27dd7762ae 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Stream.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Stream.cs @@ -98,7 +98,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 var (oldState, newState) = ApplyCompletionFlag(StreamCompletionFlags.Aborted); if (oldState != newState) { - Debug.Assert(!_decrementCalled); + Debug.Assert(_decrementCalled); // Don't block on IO. This never faults. _ = _http2Output.WriteRstStreamAsync(Http2ErrorCode.NO_ERROR); RequestBodyPipe.Writer.Complete(); From 417cba2d50750efc4ecba55b5fb4b78277f6188f Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Thu, 15 Aug 2019 08:48:06 -0700 Subject: [PATCH 2/3] Microsoft.AspNetCore.App =>Ref in the platform manifest (#13129) --- src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj | 2 +- src/Framework/test/TargetingPackTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj b/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj index d483371a18..9b6fe29f6f 100644 --- a/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj +++ b/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj @@ -228,7 +228,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant 0) { Assert.True(Version.TryParse(parts[2], out _), "Assembly version must be convertable to System.Version"); From b2a0b02e35868005ebb5aed9d8aff6ad0476926f Mon Sep 17 00:00:00 2001 From: Pranav K Date: Thu, 15 Aug 2019 09:18:41 -0700 Subject: [PATCH 3/3] Update runtime compilation to target CSharpLang v8.0 by default (#13110) Fixes https://github.com/aspnet/AspNetCore/issues/9129 --- src/Mvc/Mvc.Razor.RuntimeCompilation/src/CSharpCompiler.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Mvc/Mvc.Razor.RuntimeCompilation/src/CSharpCompiler.cs b/src/Mvc/Mvc.Razor.RuntimeCompilation/src/CSharpCompiler.cs index 92860f2f0c..d9b20c8c7e 100644 --- a/src/Mvc/Mvc.Razor.RuntimeCompilation/src/CSharpCompiler.cs +++ b/src/Mvc/Mvc.Razor.RuntimeCompilation/src/CSharpCompiler.cs @@ -211,10 +211,8 @@ namespace Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation if (string.IsNullOrEmpty(dependencyContextOptions.LanguageVersion)) { - // During preview releases, Roslyn assumes Preview language version for netcoreapp3.0 targeting projects. - // We will match the behavior if the project does not specify a value for C# language (e.g. if you're using Razor compilation in a F# project). - // Prior to 3.0 RTM, this value needs to be changed to "Latest". This is tracked via https://github.com/aspnet/AspNetCore/issues/9129 - parseOptions = parseOptions.WithLanguageVersion(LanguageVersion.Preview); + // If the user does not specify a LanguageVersion, assume CSharp 8.0. This matches the language version Razor 3.0 targets by default. + parseOptions = parseOptions.WithLanguageVersion(LanguageVersion.CSharp8); } else if (LanguageVersionFacts.TryParse(dependencyContextOptions.LanguageVersion, out var languageVersion)) {