提交 2f302873 编写于 作者: J Jared Parsons

Use NETCOREAPP

This changes all of our uses of `NETCOREAPP3_1` to `NETCOREAPP`. There
is no value in distinguishing the exact .NET Core version we use in our
source tree as we only target one version. Also going forward it's not
expected that our .NET Core specific code will be version specific. If
that arises we can go back to version specific defines for those cases.

This also removes the last references to `netcoreapp1.1`,
`netcoreapp2.1` and `netcoreapp3.0` from our code.
上级 aaed1133
......@@ -5849,7 +5849,7 @@ public void BinaryFileErrorTest()
CleanupAllGeneratedFiles(binaryPath);
}
#if !NETCOREAPP3_1
#if !NETCOREAPP
[WorkItem(530221, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530221")]
[WorkItem(5660, "https://github.com/dotnet/roslyn/issues/5660")]
[ConditionalFact(typeof(WindowsOnly), typeof(IsEnglishLocal))]
......
......@@ -2270,7 +2270,7 @@ internal void Goo()
}
}
#if !NETCOREAPP3_1
#if !NETCOREAPP
[ConditionalFact(typeof(WindowsDesktopOnly), Reason = ConditionalSkipReason.TestExecutionNeedsDesktopTypes)]
[WorkItem(399, "https://github.com/dotnet/roslyn/issues/399")]
public void Bug399()
......
......@@ -14,7 +14,7 @@ namespace Microsoft.CodeAnalysis.CSharp.UnitTests.Symbols
{
public class PEParameterSymbolTests : CSharpTestBase
{
#if !NETCOREAPP3_1
#if !NETCOREAPP
[Fact]
public void NoParameterNames()
{
......
......@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#if NETCOREAPP3_1
#if NETCOREAPP
using System.Diagnostics;
using System.Reflection;
......
......@@ -166,7 +166,7 @@ internal static bool CheckPipeConnectionOwnership(NamedPipeClientStream pipeStre
return security;
}
#elif NETCOREAPP3_1
#elif NETCOREAPP
private static PipeOptions CurrentUserOption = PipeOptions.CurrentUserOnly;
......
......@@ -53,7 +53,7 @@ internal static bool IsDotNetHost([NotNullWhen(true)] out string? pathToDotNet)
internal static NamedPipeClientStream CreateNamedPipeClient(string serverName, string pipeName, PipeDirection direction, PipeOptions options) =>
new NamedPipeClientStream(serverName, pipeName, direction, options);
#elif NETCOREAPP3_1
#elif NETCOREAPP
internal static bool IsDesktopRuntime => false;
private static string DotNetHostPathEnvironmentName = "DOTNET_HOST_PATH";
......
......@@ -9,8 +9,8 @@
using System.Threading;
using System.Threading.Tasks;
// The ShadowCopyAnalyzerAssemblyLoader derives from DesktopAnalyzerAssemblyLoader (NET472) OR CoreClrAnalyzerAssemblyLoader (NETCOREAPP3_1)
#if NET472 || NETCOREAPP3_1
// The ShadowCopyAnalyzerAssemblyLoader derives from DesktopAnalyzerAssemblyLoader (NET472) OR CoreClrAnalyzerAssemblyLoader (NETCOREAPP)
#if NET472 || NETCOREAPP
namespace Microsoft.CodeAnalysis
{
......
......@@ -20,7 +20,7 @@ public static partial class RuntimeUtilities
internal static bool IsDesktopRuntime =>
#if NET472
true;
#elif NETCOREAPP3_1
#elif NETCOREAPP
false;
#elif NETSTANDARD2_0
throw new PlatformNotSupportedException();
......@@ -51,7 +51,7 @@ internal static IRuntimeEnvironmentFactory GetRuntimeEnvironmentFactory()
{
#if NET472
return new Roslyn.Test.Utilities.Desktop.DesktopRuntimeEnvironmentFactory();
#elif NETCOREAPP3_1
#elif NETCOREAPP
return new Roslyn.Test.Utilities.CoreClr.CoreCLRRuntimeEnvironmentFactory();
#elif NETSTANDARD2_0
throw new PlatformNotSupportedException();
......@@ -64,7 +64,7 @@ internal static AnalyzerAssemblyLoader CreateAnalyzerAssemblyLoader()
{
#if NET472
return new DesktopAnalyzerAssemblyLoader();
#elif NETCOREAPP3_1
#elif NETCOREAPP
return new CoreClrAnalyzerAssemblyLoader();
#elif NETSTANDARD2_0
return new ThrowingAnalyzerAssemblyLoader();
......
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#if NETCOREAPP3_1
#if NETCOREAPP
using System;
using System.Linq;
using System.Collections.Generic;
......
......@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#if NETCOREAPP3_1
#if NETCOREAPP
using System;
using System.Collections.Generic;
......
#if NETCOREAPP3_1
#if NETCOREAPP
using System;
using System.IO;
......
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#if NETCOREAPP3_1
#if NETCOREAPP
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
......
......@@ -323,8 +323,6 @@ private bool CheckTargetFrameworks(TextWriter textWriter)
{
case "net20":
case "net472":
case "netcoreapp2.1":
case "netcoreapp3.0":
case "netcoreapp3.1":
case "$(RoslynPortableTargetFrameworks)":
continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册