Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Cleanup netfx-specific code from projects that no longer build in net…
Browse files Browse the repository at this point in the history
…fx configurations (#31818)

* Remove Crc32Helper.Managed.cs and '$(TargetGroup)' == 'netfx' conditionals from System.IO.Compression.csproj

* Remove netfx conditionals from System.Data.Common.csproj

* Remove netfx conditionals from System.Diagnostics.StackTrace.csproj

* Remove 'netfx' and 'net46' conditionals from System.Net.Http.csproj

* Remove 'netfx' conditionals from System.Net.Sockets.csproj

* Remove 'netfx', 'net462' and 'net47' conditionals from System.Runtime.InteropServices.RuntimeInformation.csproj

* Remove 'netfx' conditionals from System.Runtime.Serialization.Primitives.csproj

* Remove 'netfx' conditionals from System.Runtime.Serialization.Xml.csproj

* Remove 'netfx' and 'net47' conditionals from System.Security.Cryptography.Algorithms.csproj

* Remove 'netfx' conditionals from System.Security.SecureString.csproj

* Remove 'netfx' conditionals from System.Threading.Overlapped.csproj

* Remove 'netfx' conditionals from System.Xml.XPath.XDocument.csproj

* Trim out unused source file DeferredDisposableLifetime.cs
  • Loading branch information
TimLovellSmith authored and ViktorHofer committed Aug 26, 2018
1 parent 8851575 commit 6a0ecec
Show file tree
Hide file tree
Showing 36 changed files with 43 additions and 1,887 deletions.
116 changes: 0 additions & 116 deletions src/Common/src/CoreLib/System/Threading/DeferredDisposableLifetime.cs

This file was deleted.

21 changes: 5 additions & 16 deletions src/System.Data.Common/src/System.Data.Common.csproj
Expand Up @@ -4,16 +4,10 @@
<AssemblyName>System.Data.Common</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>AnyCPU</PlatformTarget>
<IsPartialFacadeAssembly Condition="'$(TargetGroup)' == 'netfx'">true</IsPartialFacadeAssembly>
<DefineConstants Condition="'$(TargetGroup)' == 'netfx'">$(DefineConstants);netfx</DefineConstants>
<DefineConstants Condition="'$(TargetGroup)' == 'uapaot'">$(DefineConstants);uapaot</DefineConstants>
<Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Data\Common\DbColumn.cs" />
<Compile Include="System\Data\Common\IDbColumnSchemaGenerator.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' != 'netfx'">
<Compile Include="System.Data.Common.TypeForwards.cs" />
<Compile Include="System\HResults.cs" />
<Compile Include="System\Xml\TreeIterator.cs" />
Expand Down Expand Up @@ -177,6 +171,7 @@
<Compile Include="System\Data\Common\DataTableMappingCollection.cs" />
<Compile Include="System\Data\Common\DateTimeOffsetStorage.cs" />
<Compile Include="System\Data\Common\DateTimeStorage.cs" />
<Compile Include="System\Data\Common\DbColumn.cs" />
<Compile Include="System\Data\Common\DbCommand.cs">
<SubType>Component</SubType>
</Compile>
Expand Down Expand Up @@ -219,6 +214,7 @@
<Compile Include="System\Data\Common\DoubleStorage.cs" />
<Compile Include="System\Data\Common\FieldNameLookup.cs" />
<Compile Include="System\Data\Common\Groupbybehavior.cs" />
<Compile Include="System\Data\Common\IDbColumnSchemaGenerator.cs" />
<Compile Include="System\Data\Common\identifiercase.cs" />
<Compile Include="System\Data\Common\Int16Storage.cs" />
<Compile Include="System\Data\Common\Int32Storage.cs" />
Expand Down Expand Up @@ -297,14 +293,7 @@
<Compile Include="System\Data\ProviderBase\DataReaderContainer.cs" />
<Compile Include="System\Data\ProviderBase\SchemaMapping.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'netfx'">
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Transactions" />
<Compile Include="System\Data\Common\DbDataReaderExtensions.Facade.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' != 'netfx'">
<ItemGroup>
<Reference Include="System.Collections" />
<Reference Include="System.Collections.Concurrent" />
<Reference Include="System.Collections.NonGeneric" />
Expand All @@ -329,7 +318,7 @@
<Reference Include="System.Threading.Thread" />
<Reference Include="System.Transactions.Local" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' != 'uapaot' and '$(TargetGroup)' != 'netfx'">
<ItemGroup Condition="'$(TargetGroup)' != 'uapaot'">
<Reference Include="System.Xml.ReaderWriter" />
<Reference Include="System.Xml.XmlSerializer" />
</ItemGroup>
Expand All @@ -339,4 +328,4 @@
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' or '$(TargetGroup)' == 'uap' or '$(TargetGroup)' == 'uapaot'">
<EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
</ItemGroup>
</Project>
</Project>
4 changes: 0 additions & 4 deletions src/System.Data.Common/src/System/Data/SQLTypes/SQLDouble.cs
Expand Up @@ -34,11 +34,7 @@ private SqlDouble(bool fNull)

public SqlDouble(double value)
{
#if !netfx
if (!double.IsFinite(value))
#else
if (double.IsInfinity(value) || double.IsNaN(value))
#endif
{
throw new OverflowException(SQLResource.ArithOverflowMessage);
}
Expand Down
4 changes: 0 additions & 4 deletions src/System.Data.Common/src/System/Data/SQLTypes/SQLSingle.cs
Expand Up @@ -31,11 +31,7 @@ private SqlSingle(bool fNull)

public SqlSingle(float value)
{
#if !netfx
if (!float.IsFinite(value))
#else
if (float.IsInfinity(value) || float.IsNaN(value))
#endif
{
throw new OverflowException(SQLResource.ArithOverflowMessage);
}
Expand Down
@@ -1,18 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{C38217EF-88F4-4D56-9F58-780BE1DDAFF6}</ProjectGuid>
<IsPartialFacadeAssembly Condition="'$(TargetGroup)' == 'netfx'">true</IsPartialFacadeAssembly>
<Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Diagnostics.StackTrace.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'netfx'">
<Reference Include="mscorlib" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' != 'netfx'">
<ItemGroup>
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.Runtime.Extensions\ref\System.Runtime.Extensions.csproj" />
<ProjectReference Include="..\..\System.Reflection\ref\System.Reflection.csproj" />
</ItemGroup>
</Project>
</Project>
Expand Up @@ -9,7 +9,7 @@
<Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release</Configurations>
</PropertyGroup>
<!-- Default configurations to help VS understand the options -->
<ItemGroup Condition="'$(TargetGroup)' != 'netfx'">
<ItemGroup>
<Compile Include="System\Diagnostics\SymbolStore\ISymbolBinder.cs" />
<Compile Include="System\Diagnostics\SymbolStore\ISymbolDocument.cs" />
<Compile Include="System\Diagnostics\SymbolStore\ISymbolMethod.cs" />
Expand Down Expand Up @@ -41,10 +41,7 @@
<ItemGroup Condition="'$(TargetsAOT)'=='true'">
<Compile Include="System\Diagnostics\SymbolStore\ISymbolDocumentWriter.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' != 'netfx'">
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'netfx'">
<Reference Include="mscorlib" />
</ItemGroup>
</Project>
9 changes: 2 additions & 7 deletions src/System.IO.Compression/ref/System.IO.Compression.csproj
@@ -1,20 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{7CBACE0E-E07C-4ADB-A413-ADEC0CACBD43}</ProjectGuid>
<IsPartialFacadeAssembly Condition="'$(TargetGroup)' == 'netfx'">true</IsPartialFacadeAssembly>
<Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.IO.Compression.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' != 'netfx'">
<ItemGroup>
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.IO\ref\System.IO.csproj" />
<ProjectReference Include="..\..\System.Text.Encoding\ref\System.Text.Encoding.csproj" />
<ProjectReference Include="..\..\System.Threading.Tasks\ref\System.Threading.Tasks.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'netfx'">
<Reference Include="mscorlib" />
<Reference Include="System" />
</ItemGroup>
</Project>
</Project>
36 changes: 12 additions & 24 deletions src/System.IO.Compression/src/System.IO.Compression.csproj
Expand Up @@ -4,11 +4,11 @@
<OutputType>Library</OutputType>
<ProjectGuid>{E9ED0A04-23A8-4F8B-82C1-2B18AF74C870}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly Condition="'$(TargetGroup)' == 'netfx'">true</IsPartialFacadeAssembly>
<Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<!-- Default configurations to help VS understand the options -->
<ItemGroup>
<Compile Include="Interop\Interop.zlib.cs" />
<Compile Include="$(SharedOpenSourcePath)System\IO\Compression\ZipArchive.cs" />
<Compile Include="$(SharedOpenSourcePath)System\IO\Compression\ZipArchiveEntry.cs" />
<Compile Include="$(SharedOpenSourcePath)System\IO\Compression\ZipArchiveMode.cs" />
Expand All @@ -33,38 +33,30 @@
<Compile Include="System\IO\Compression\DeflateManaged\MatchState.cs" />
<Compile Include="System\IO\Compression\DeflateManaged\OutputBuffer.cs" />
<Compile Include="System\IO\Compression\DeflateManaged\OutputWindow.cs" />
<Compile Include="System\IO\Compression\PositionPreservingWriteOnlyStreamWrapper.cs" />
<Compile Include="$(CommonPath)\CoreLib\System\Threading\Tasks\TaskToApm.cs">
<Link>Common\CoreLib\System\Threading\Tasks\TaskToApm.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' != 'netfx'">
<Compile Include="Interop\Interop.zlib.cs" />
<Compile Include="System\IO\Compression\CompressionLevel.cs" />
<Compile Include="System\IO\Compression\CompressionMode.cs" />
<Compile Include="System\IO\Compression\GZipStream.cs" />
<Compile Include="System\IO\Compression\Crc32Helper.ZLib.cs" />
<Compile Include="System\IO\Compression\DeflateZLib\Deflater.cs" />
<Compile Include="System\IO\Compression\DeflateZLib\DeflateStream.cs" />
<Compile Include="System\IO\Compression\DeflateZLib\Inflater.cs" />
<Compile Include="System\IO\Compression\DeflateZLib\ZLibException.cs" />
<Compile Include="System\IO\Compression\DeflateZLib\ZLibNative.cs" />
<Compile Include="System\IO\Compression\DeflateZLib\ZLibNative.ZStream.cs" />
<Compile Include="System\IO\Compression\CompressionLevel.cs" />
<Compile Include="System\IO\Compression\CompressionMode.cs" />
<Compile Include="System\IO\Compression\Crc32Helper.ZLib.cs" />
<Compile Include="System\IO\Compression\GZipStream.cs" />
<Compile Include="System\IO\Compression\PositionPreservingWriteOnlyStreamWrapper.cs" />
<Compile Include="System\IO\Compression\PositionPreservingWriteOnlyStreamWrapper.netcoreapp.cs" />
<Compile Include="System\IO\Compression\ZipArchiveEntry.netcoreapp.cs" />
<Compile Include="System\IO\Compression\ZipCustomStreams.netcoreapp.cs" />
<Compile Include="System\IO\Compression\PositionPreservingWriteOnlyStreamWrapper.netcoreapp.cs" />
<Compile Include="$(CommonPath)\CoreLib\System\IO\StreamHelpers.CopyValidation.cs">
<Link>Common\CoreLib\System\IO\StreamHelpers.CopyValidation.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'netfx'">
<Compile Include="System\IO\Compression\Crc32Helper.Managed.cs" />
<Compile Include="$(CommonPath)\CoreLib\System\Threading\Tasks\TaskToApm.cs">
<Link>Common\CoreLib\System\Threading\Tasks\TaskToApm.cs</Link>
</Compile>
</ItemGroup>
<!-- Windows specific files -->
<ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
<Compile Include="System\IO\Compression\ZipArchiveEntry.Windows.cs" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetsWindows)' == 'true' AND '$(TargetGroup)' != 'netfx'">
<Compile Include="$(CommonPath)\System\IO\PathInternal.Windows.cs">
<Link>Common\System\IO\PathInternal.Windows.cs</Link>
</Compile>
Expand All @@ -85,7 +77,7 @@
<Link>Common\CoreLib\Interop\Unix\System.Native\Interop.PathConf.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' != 'netfx'">
<ItemGroup>
<Reference Include="System.Buffers" />
<Reference Include="System.Collections" />
<Reference Include="System.Diagnostics.Debug" />
Expand All @@ -98,8 +90,4 @@
<Reference Include="System.Threading" />
<Reference Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'netfx'">
<Reference Include="mscorlib" />
<Reference Include="System" />
</ItemGroup>
</Project>
</Project>

0 comments on commit 6a0ecec

Please sign in to comment.