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

Introducing netstandard13aot target group in System.IO #6597

Merged
merged 1 commit into from
Mar 5, 2016
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
8 changes: 8 additions & 0 deletions dir.props
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@
<OSGroup Condition="'$(OSGroup)'==''">AnyOS</OSGroup>

<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('netcore50aot'))">netcore50aot</TargetGroup>
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('netstandard13aot'))">netstandard13aot</TargetGroup>
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('netcore50'))">netcore50</TargetGroup>
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('dnxcore50'))">dnxcore50</TargetGroup>
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('net462'))">net462</TargetGroup>
Expand Down Expand Up @@ -309,6 +310,13 @@
<NuGetTargetMoniker>.NETCore,Version=v5.0</NuGetTargetMoniker>
</PropertyGroup>
</When>
<When Condition="'$(TargetGroup)'=='netstandard13aot'">
<PropertyGroup>
<PackageTargetFramework>netstandard1.3</PackageTargetFramework>
<PackageTargetRuntime>aot</PackageTargetRuntime>
<NuGetTargetMoniker>.NETStandard,Version=v1.3</NuGetTargetMoniker>
</PropertyGroup>
</When>
<When Condition="'$(TargetGroup)'=='dnxcore50'">
<PropertyGroup>
<PackageTargetFramework>dnxcore50</PackageTargetFramework>
Expand Down
55 changes: 55 additions & 0 deletions src/Common/src/System/SR.CoreRT.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// 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.

using System.Runtime.CompilerServices;

namespace System
{
// This is a placeholder for resources access implementation for corert.
// At some point we’ll have the real implementation which expect to be shared between
// System.IO, System.Runtime.Extensions and System.Resources.ResourceManager.

internal static partial class SR
{
[MethodImpl(MethodImplOptions.NoInlining)]
internal static string GetResourceString(string resourceKey)
{
return resourceKey;
}

internal static string GetResourceString(string resourceKey, string defaultString)
{
return defaultString != null ? defaultString : resourceKey;
}

internal static string Format(string resourceFormat, params object[] args)
{
if (args != null)
{
return string.Format(resourceFormat, args);
}

return resourceFormat;
}


[MethodImpl(MethodImplOptions.NoInlining)]
internal static string Format(string resourceFormat, object p1)
{
return string.Format(resourceFormat, p1);
}

[MethodImpl(MethodImplOptions.NoInlining)]
internal static string Format(string resourceFormat, object p1, object p2)
{
return string.Format(resourceFormat, p1, p2);
}

[MethodImpl(MethodImplOptions.NoInlining)]
internal static string Format(string resourceFormat, object p1, object p2, object p3)
{
return string.Format(resourceFormat, p1, p2, p3);
}
}
}
3 changes: 3 additions & 0 deletions src/System.IO/pkg/aot/System.IO.pkgproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
<ProjectReference Include="..\..\src\System.IO.csproj">
<TargetGroup>netcore50aot</TargetGroup>
</ProjectReference>
<ProjectReference Include="..\..\src\System.IO.csproj">
<TargetGroup>netstandard13aot</TargetGroup>
</ProjectReference>
</ItemGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
Expand Down
3 changes: 3 additions & 0 deletions src/System.IO/src/System.IO.builds
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<Project Include="System.IO.csproj">
<TargetGroup>netcore50aot</TargetGroup>
</Project>
<Project Include="System.IO.csproj">
<TargetGroup>netstandard13aot</TargetGroup>
</Project>
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
</Project>
Expand Down
16 changes: 13 additions & 3 deletions src/System.IO/src/System.IO.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net46_Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcore50aot_Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcore50aot_Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard13aot_Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard13aot_Release|AnyCPU'" />

<PropertyGroup Condition="'$(TargetGroup)' == 'net46'">
<ResourcesSourceOutputDirectory>None</ResourcesSourceOutputDirectory>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetGroup)' == 'netcore50aot'">
<PropertyGroup Condition="'$(TargetGroup)' == 'netcore50aot' or '$(TargetGroup)' == 'netstandard13aot'">
<SkipCommonResourcesIncludes>true</SkipCommonResourcesIncludes>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ExcludeAssemblyInfoPartialFile>true</ExcludeAssemblyInfoPartialFile>
Expand All @@ -41,7 +43,7 @@
<Compile Include="System\IO\InvalidDataException.cs" />
</ItemGroup>

<ItemGroup Condition="'$(TargetGroup)' == 'netcore50aot'">
<ItemGroup Condition="'$(TargetGroup)' == 'netcore50aot' or '$(TargetGroup)' == 'netstandard13aot'">
<Compile Include="System\IO\BinaryReader.cs" />
<Compile Include="System\IO\BinaryWriter.cs" />
<Compile Include="System\IO\EndOfStreamException.cs" />
Expand All @@ -61,9 +63,12 @@
<Compile Include="$(CommonPath)\System\IO\StringBuilderCache.cs">
<Link>Common\System\IO\StringBuilderCache.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\SR.Core.cs">
<Compile Include="$(Commonpath)\System\SR.Core.cs" Condition="'$(TargetGroup)' == 'netcore50aot'">
<Link>Common\System\SR.Core.cs</Link>
</Compile>
<Compile Include="$(Commonpath)\System\SR.CoreRT.cs" Condition="'$(TargetGroup)' == 'netstandard13aot'">
<Link>Common\System\SR.CoreRT.cs</Link>
</Compile>
</ItemGroup>

<ItemGroup Condition="'$(TargetGroup)' == 'netcore50aot'">
Expand All @@ -79,6 +84,11 @@
<ItemGroup>
<None Include="project.json" />
</ItemGroup>

<ItemGroup Condition="'$(TargetGroup)' == 'netstandard13aot'">
<TargetingPackReference Include="System.Private.Interop" />
<ValidateIgnoreReference Include="@(TargetingPackReference)" />
</ItemGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>
17 changes: 16 additions & 1 deletion src/System.IO/src/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,21 @@
"dependencies": {
"Microsoft.TargetingPack.NETFramework.v4.6": "1.0.1"
}
}
},
"netstandard1.3": {
"imports": [ "netcore50" ],
"dependencies": {
"Microsoft.NETCore.Platforms": "1.0.1-rc3-23901",
"Microsoft.TargetingPack.Private.NETNative": "1.0.0-rc3-23901",
"System.Diagnostics.Contracts": "4.0.0",
"System.Diagnostics.Debug": "4.0.10",
"System.Diagnostics.Tools": "4.0.0",
"System.Globalization": "4.0.0",
"System.Runtime.Extensions": "4.0.10",
"System.Text.Encoding.Extensions": "4.0.0",
"System.Threading": "4.0.0",
"System.Threading.Tasks": "4.0.10"
}
}
}
}