Skip to content

Commit

Permalink
Enable tests to compile with netstandard (dotnet/corefx#15956)
Browse files Browse the repository at this point in the history
* Enable tests to compile with netstandard

Most of the tests have netstandard configurations and it doesn't compile. the changes here is to fix the configurations and the tests to compile.
This is important step to get netfx tests compile too as we are in most of the time netfx fallback to netstandard configuration

The changes include some fixes to compile teh sources too.

* Fix System.Collections.Immutable

* update src configuration

* remove netstandard17 defines

* Split netcoreapp code to its own files

* Remove 17 from the test class name


Commit migrated from dotnet/corefx@15b4f51
  • Loading branch information
tarekgh committed Feb 8, 2017
1 parent ae1aa33 commit 9e103ac
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 17 deletions.
Expand Up @@ -2,9 +2,7 @@
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildConfigurations>
net45;
netstandard;
netstandard1.1;
</BuildConfigurations>
</PropertyGroup>
</Project>
Expand Up @@ -5,17 +5,13 @@
<UseOpenKey Condition="'$(UseOpenKey)'==''">true</UseOpenKey>
<ProjectGuid>{3DF9A5D5-3D4B-4378-9B55-CFA6AC0114D9}</ProjectGuid>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net45-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net45-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard1.1-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard1.1-Release|AnyCPU'" />
<ItemGroup>
<Compile Include="System.Diagnostics.DiagnosticSource.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'netstandard1.1'">
<Compile Include="System.Diagnostics.DiagnosticSourceActivity.cs" />
<Compile Include="System.Diagnostics.DiagnosticSourceActivity.cs" />
<Reference Include="System.Runtime" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
Expand Down
Expand Up @@ -2,8 +2,6 @@
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildConfigurations>
net45-Windows_NT;
netstandard1.1;
netstandard1.3;
netstandard;
netcoreapp;
Expand Down
Expand Up @@ -17,8 +17,6 @@
<DefineConstants>;NO_EVENTSOURCE_COMPLEX_TYPE_SUPPORT</DefineConstants>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net45-Windows_NT-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net45-Windows_NT-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Debug|AnyCPU'" />
Expand All @@ -27,8 +25,6 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard1.1-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard1.3-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard1.3-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard1.5-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard1.5-Release|AnyCPU'" />
<ItemGroup>
<Compile Include="System\Diagnostics\DiagnosticSource.cs" />
<Compile Include="System\Diagnostics\DiagnosticListener.cs" />
Expand All @@ -52,7 +48,7 @@
<Compile Include="System\Diagnostics\Activity.Id.Random.cs" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetGroup)' != 'netstandard1.3' And '$(TargetGroup)' != 'netstandard1.1'">
<Compile Include="System\Diagnostics\Activity.Id.MachineName.cs" />
<Compile Include="System\Diagnostics\Activity.Id.MachineName.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Collections" />
Expand Down
Expand Up @@ -2,7 +2,6 @@
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildConfigurations>
net45-Windows_NT;
netstandard1.1;
netstandard1.3;
netstandard1.5;
Expand Down
Expand Up @@ -4,8 +4,6 @@
<PropertyGroup>
<ProjectGuid>{A7922FA3-306A-41B9-B8DC-CC4DBE685A85}</ProjectGuid>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net45-Windows_NT-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net45-Windows_NT-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard1.1-Debug|AnyCPU'" />
Expand Down

0 comments on commit 9e103ac

Please sign in to comment.