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

Fix netcoreapp2.0 use in TestUtilities #25386

Merged
merged 2 commits into from
Mar 12, 2018
Merged
Show file tree
Hide file tree
Changes from all 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
@@ -1,7 +1,5 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

// The use of SigningTestHelpers makes this necessary for now. Fix is tracked by https://github.com/dotnet/roslyn/issues/25228
#if NET461
using System;
using System.Collections.Immutable;
using System.IO;
Expand Down Expand Up @@ -163,4 +161,3 @@ public static void Main(string[] args) { }
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
<PackageReference Include="xunit.runner.visualstudio" Version="$(xunitrunnervisualstudioVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNETTestSdkVersion)" />
<PackageReference Include="Microsoft.NETCore.App" Version="$(MicrosoftNETCoreAppVersion)" Condition="'$(TargetFramework)' == 'netcoreapp2.0'" />
<PackageReference Include="System.Reflection.TypeExtensions" Version="$(SystemReflectionTypeExtensionsVersion)" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Resources.resx">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNETTestSdkVersion)" />
<PackageReference Include="Microsoft.NETCore.App" Version="$(MicrosoftNETCoreAppVersion)" Condition="'$(TargetFramework)' == 'netcoreapp2.0'" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(xunitrunnervisualstudioVersion)" />
<PackageReference Include="System.Reflection.TypeExtensions" Version="$(SystemReflectionTypeExtensionsVersion)" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#if NET461 || NET46 || NETCOREAPP2_0
#if !NETSTANDARD1_3
using System;
using System.Collections.Generic;
using System.Globalization;
Expand Down Expand Up @@ -542,14 +542,10 @@ static private void AppendFieldInfo(FieldInfo field, StringBuilder sb)

if (field.IsInitOnly) sb.Append("initonly ");
if (field.IsLiteral) sb.Append("literal ");
#if NET46 || NET461
if (field.IsNotSerialized) sb.Append("notserialized ");
#endif
if (field.Attributes.HasFlag(FieldAttributes.SpecialName)) sb.Append("specialname ");
if (field.Attributes.HasFlag(FieldAttributes.RTSpecialName)) sb.Append("rtspecialname ");
#if NET46 || NET461
if (field.IsPinvokeImpl) sb.Append("pinvokeimpl ");
#endif

sb.Append(field.IsStatic ? "static " : "instance ");
AppendType(field.FieldType, sb);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

#if NET461 || NET46
#if !NETSTANDARD1_3
using System;
using System.Collections.Immutable;
using System.IO;
Expand Down
34 changes: 7 additions & 27 deletions src/Test/Utilities/Portable/TestUtilities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<DefineConstants>$(DefineConstants);DNX</DefineConstants>
<NoStdLib>true</NoStdLib>
<RootNamespace></RootNamespace>
<DisableImplicitFrameworkReferences>false</DisableImplicitFrameworkReferences>
</PropertyGroup>
<ItemGroup Label="Project References">
<ProjectReference Include="..\..\..\Compilers\Test\Resources\Core\CompilerTestResources.csproj" />
Expand Down Expand Up @@ -95,36 +96,15 @@
<PackageReference Include="Microsoft.DiaSymReader.Converter.Xml" Version="$(MicrosoftDiaSymReaderConverterXmlVersion)" />
<PackageReference Include="Microsoft.Metadata.Visualizer" Version="$(MicrosoftMetadataVisualizerVersion)" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="$(MicrosoftNETCorePlatformsVersion)" />
<PackageReference Include="Microsoft.Win32.Primitives" Version="$(MicrosoftWin32PrimitivesVersion)" />
<PackageReference Include="System.AppContext" Version="$(SystemAppContextVersion)" />
<PackageReference Include="System.Collections.Concurrent" Version="$(SystemCollectionsConcurrentVersion)" />
<PackageReference Include="System.Console" Version="$(SystemConsoleVersion)" />
<PackageReference Include="System.Data.Common" Version="$(SystemDataCommonVersion)" />
<PackageReference Include="System.Diagnostics.Debug" Version="$(SystemDiagnosticsDebugVersion)" />
<PackageReference Include="System.Diagnostics.Tools" Version="$(SystemDiagnosticsToolsVersion)" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">
<PackageReference Include="System.Reflection.TypeExtensions" Version="$(SystemReflectionTypeExtensionsVersion)" />
<PackageReference Include="System.Diagnostics.TraceSource" Version="$(SystemDiagnosticsTraceSourceVersion)" />
<PackageReference Include="System.Diagnostics.Process" Version="$(SystemDiagnosticsProcessVersion)" />
<PackageReference Include="System.IO.FileSystem" Version="$(SystemIOFileSystemVersion)" />
<PackageReference Include="System.Net.Primitives" Version="$(SystemNetPrimitivesVersion)" />
<PackageReference Include="System.Reflection.TypeExtensions" Version="$(SystemReflectionTypeExtensionsVersion)" />
<PackageReference Include="System.Security.Cryptography.Algorithms" Version="$(SystemSecurityCryptographyAlgorithmsVersion)" />
<PackageReference Include="System.Text.RegularExpressions" Version="$(SystemTextRegularExpressionsVersion)" />
<PackageReference Include="System.Threading.Thread" Version="$(SystemThreadingThreadVersion)" />
<PackageReference Include="System.Xml.XDocument" Version="$(SystemXmlXDocumentVersion)" />
<PackageReference Include="System.Xml.XmlDocument" Version="$(SystemXmlXmlDocumentVersion)" />
<PackageReference Include="System.Runtime.Loader" Version="$(SystemRuntimeLoaderVersion)" Condition="'$(TargetFramework)' == 'netcoreapp2.0'" />
<PackageReference Include="xunit" Version="$(xunitVersion)" />
<PackageReference Include="xunit.analyzers" Version="$(xunitanalyzersVersion)" />
<PackageReference Include="xunit.runner.console" Version="$(xunitrunnerconsoleVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(xunitrunnervisualstudioVersion)" />

<!-- This reference is necessary to pull down the assemblies we compile + run against
in the compiler layer when running on CoreClr. Don't actually want to reference
anything here, just have it available -->
<PackageReference Include="NETStandard.Library" Version="$(NETStandardLibraryFixedVersion)" Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<PrivateAssets>all</PrivateAssets>
<ExcludeAssets>all</ExcludeAssets>
</PackageReference>
</ItemGroup>
<ProjectExtensions />
</Project>