提交 aeb20570 编写于 作者: A AlekseyTs

Target netcoreapp3.0 for Default Interface Implementation tests.

上级 8b3de828
......@@ -74,10 +74,12 @@
<MicrosoftMSXMLVersion>8.0.0.0-alpha</MicrosoftMSXMLVersion>
<MicrosoftNetCompilersVersion>2.9.0-beta7-63018-03</MicrosoftNetCompilersVersion>
<MicrosoftNetCoreAnalyzersVersion>$(RoslynDiagnosticsNugetPackageVersion)</MicrosoftNetCoreAnalyzersVersion>
<MicrosoftNetCoreILAsmVersion>2.0.0</MicrosoftNetCoreILAsmVersion>
<!-- PROTOTYPE(DefaultInterfaceImplementation): The MicrosoftNetCoreILAsmVersion was 2.0.0 -->
<MicrosoftNetCoreILAsmVersion>3.0.0-preview-27312-01</MicrosoftNetCoreILAsmVersion>
<MicrosoftNETCoreCompilersVersion>2.9.0-beta7-63018-03</MicrosoftNETCoreCompilersVersion>
<MicrosoftNETCorePlatformsVersion>2.1.0</MicrosoftNETCorePlatformsVersion>
<MicrosoftNETCoreRuntimeCoreCLRVersion>2.0.0</MicrosoftNETCoreRuntimeCoreCLRVersion>
<!-- PROTOTYPE(DefaultInterfaceImplementation): The MicrosoftNETCoreRuntimeCoreCLRVersion was 2.0.0 -->
<MicrosoftNETCoreRuntimeCoreCLRVersion>3.0.0-preview-27313-3</MicrosoftNETCoreRuntimeCoreCLRVersion>
<!-- Using a private build of Microsoft.Net.Test.SDK to work around issue https://github.com/Microsoft/vstest/issues/1764 -->
<MicrosoftNETTestSdkVersion>15.9.0-dev2</MicrosoftNETTestSdkVersion>
<MicrosoftServiceHubClientVersion>1.3.23</MicrosoftServiceHubClientVersion>
......
......@@ -154,7 +154,9 @@ function BuildSolution() {
$enableAnalyzers = !$skipAnalyzers
$toolsetBuildProj = InitializeToolset
$quietRestore = !$ci
$testTargetFrameworks = if ($testCoreClr) { "netcoreapp2.1" } else { "" }
# PROTOTYPE(DefaultInterfaceImplementation): Added "netcoreapp3.0%3B", original value was "netcoreapp2.1"
$testTargetFrameworks = if ($testCoreClr) { "netcoreapp3.0%3Bnetcoreapp2.1" } else { "" }
# Do not set the property to true explicitly, since that would override value projects might set.
$suppressExtensionDeployment = if (!$deployExtensions) { "/p:DeployExtension=false" } else { "" }
......
{
"tools": {
"dotnet": "2.1.401",
"dotnet": "3.0.100-preview-010088",
"vs": {
"version": "15.8"
},
......
......@@ -7,7 +7,8 @@
<OutputType>Library</OutputType>
<RootNamespace>Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests</RootNamespace>
<NoStdLib>true</NoStdLib>
<TargetFrameworks>$(RoslynPortableTargetFrameworks)</TargetFrameworks>
<!-- PROTOTYPE(DefaultInterfaceImplementation): TargetFrameworks simply used to inherit $(RoslynPortableTargetFrameworks) -->
<TargetFrameworks>net472;netcoreapp3.0</TargetFrameworks>
<RoslynProjectType>UnitTestPortable</RoslynProjectType>
<RuntimeIdentifiers>$(RoslynPortableRuntimeIdentifiers)</RuntimeIdentifiers>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
......@@ -26,6 +27,8 @@
<ProjectReference Include="..\..\..\VisualBasic\Portable\Microsoft.CodeAnalysis.VisualBasic.vbproj" />
<ProjectReference Include="..\..\Portable\Microsoft.CodeAnalysis.CSharp.csproj" />
<ProjectReference Include="..\..\..\..\Test\PdbUtilities\Roslyn.Test.PdbUtilities.csproj" />
<!-- PROTOTYPE(DefaultInterfaceImplementation): Added explicit reference below -->
<PackageReference Include="Microsoft.NETCore.App" Version="$(MicrosoftNETCoreRuntimeCoreCLRVersion)" Condition="'$(TargetFramework)' == 'netcoreapp3.0'" />
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'" />
......
......@@ -1770,7 +1770,7 @@ interface B
}
";
// CONSIDER: this cascading is a bit verbose.
CreateCompilation(source, parseOptions:TestOptions.Regular7).VerifyDiagnostics(
CreateCompilation(source, parseOptions: TestOptions.Regular7).VerifyDiagnostics(
// (18,18): error CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type
// [IndexerName(A.Constant2)]
Diagnostic(ErrorCode.ERR_BadAttributeArgument, "A.Constant2").WithLocation(18, 18),
......
......@@ -8826,7 +8826,7 @@ private enum E { zero, one }
}
";
var comp = CreateCompilation(text, parseOptions: TestOptions.Regular7);
comp.VerifyDiagnostics(
// (5,19): error CS8107: Feature 'default interface implementation' is not available in C# 7. Please use language version 7.1 or greater.
// interface IBar { }
......
......@@ -139,7 +139,7 @@ private Assembly LoadImageAsAssembly(ImmutableArray<byte> mainImage)
var platformAssemblies = ((string)AppContext.GetData("TRUSTED_PLATFORM_ASSEMBLIES")).Split(Path.PathSeparator);
foreach (var assemblyPath in platformAssemblies)
{
if (TryGetAssemblyName(assemblyPath, out string assemblyName))
if (!String.IsNullOrEmpty(assemblyPath) && TryGetAssemblyName(assemblyPath, out string assemblyName))
{
assemblyNames.Add(assemblyName, assemblyPath);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册