diff options
author | Eric St. John <ericstj@microsoft.com> | 2017-08-28 20:34:51 +0300 |
---|---|---|
committer | Eric St. John <ericstj@microsoft.com> | 2017-08-28 20:34:51 +0300 |
commit | 1f8756b47931e4ed11e1a2c6bd9af54f3c958a81 (patch) | |
tree | 3ca10b0c7dc5e252c32d63e8c47c730ae5785e92 /src | |
parent | d9d42e3765e2529ae6b7e6826a462e2ce9fe835b (diff) |
Add mscorlib facade for refs consuming Windows.winmd
Reference assemblies consuming Windows.winmd need to have
an mscorlib facade because Windows.winmd has references to
types in mscorlib.
Diffstat (limited to 'src')
4 files changed, 61 insertions, 0 deletions
diff --git a/src/System.Runtime.WindowsRuntime/ref/System.Runtime.WindowsRuntime.csproj b/src/System.Runtime.WindowsRuntime/ref/System.Runtime.WindowsRuntime.csproj index 4ad28632fd..02e0a93c09 100644 --- a/src/System.Runtime.WindowsRuntime/ref/System.Runtime.WindowsRuntime.csproj +++ b/src/System.Runtime.WindowsRuntime/ref/System.Runtime.WindowsRuntime.csproj @@ -22,6 +22,7 @@ </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\..\external\winrt\winrt.depproj" /> + <ProjectReference Include="..\..\mscorlib.WinRT-Facade\ref\mscorlib.WinRT-Facade.csproj" /> <ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" /> <ProjectReference Include="..\..\System.Runtime.Extensions\ref\System.Runtime.Extensions.csproj" /> <ProjectReference Include="..\..\System.IO\ref\System.IO.csproj" /> diff --git a/src/mscorlib.WinRT-Facade/ref/Configurations.props b/src/mscorlib.WinRT-Facade/ref/Configurations.props new file mode 100644 index 0000000000..dda77b52b9 --- /dev/null +++ b/src/mscorlib.WinRT-Facade/ref/Configurations.props @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <BuildConfigurations> + uap; + </BuildConfigurations> + </PropertyGroup> +</Project>
\ No newline at end of file diff --git a/src/mscorlib.WinRT-Facade/ref/TypeForwards.cs b/src/mscorlib.WinRT-Facade/ref/TypeForwards.cs new file mode 100644 index 0000000000..7625e953a0 --- /dev/null +++ b/src/mscorlib.WinRT-Facade/ref/TypeForwards.cs @@ -0,0 +1,33 @@ +// 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; + +// The following types are can be referenced by windows.winmd and are spec'ed to come from mscorlib +[assembly: TypeForwardedTo(typeof(System.Attribute))] +[assembly: TypeForwardedTo(typeof(System.Boolean))] +[assembly: TypeForwardedTo(typeof(System.Byte))] +[assembly: TypeForwardedTo(typeof(System.Char))] +[assembly: TypeForwardedTo(typeof(System.Double))] +[assembly: TypeForwardedTo(typeof(System.Enum))] +[assembly: TypeForwardedTo(typeof(System.FlagsAttribute))] +[assembly: TypeForwardedTo(typeof(System.Guid))] +[assembly: TypeForwardedTo(typeof(System.Int16))] +[assembly: TypeForwardedTo(typeof(System.Int32))] +[assembly: TypeForwardedTo(typeof(System.Int64))] +[assembly: TypeForwardedTo(typeof(System.IntPtr))] +[assembly: TypeForwardedTo(typeof(System.MulticastDelegate))] +[assembly: TypeForwardedTo(typeof(System.Object))] +[assembly: TypeForwardedTo(typeof(System.Runtime.CompilerServices.IsConst))] +[assembly: TypeForwardedTo(typeof(System.Single))] +[assembly: TypeForwardedTo(typeof(System.String))] +[assembly: TypeForwardedTo(typeof(System.Type))] +[assembly: TypeForwardedTo(typeof(System.UInt16))] +[assembly: TypeForwardedTo(typeof(System.UInt32))] +[assembly: TypeForwardedTo(typeof(System.UInt64))] +[assembly: TypeForwardedTo(typeof(System.ValueType))] +[assembly: TypeForwardedTo(typeof(void))] // System.Void + +// XAML compiler is checking for the following +[assembly: TypeForwardedTo(typeof(System.Array))]
\ No newline at end of file diff --git a/src/mscorlib.WinRT-Facade/ref/mscorlib.WinRT-Facade.csproj b/src/mscorlib.WinRT-Facade/ref/mscorlib.WinRT-Facade.csproj new file mode 100644 index 0000000000..f60705ffc0 --- /dev/null +++ b/src/mscorlib.WinRT-Facade/ref/mscorlib.WinRT-Facade.csproj @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> + <PropertyGroup> + <AssemblyName>mscorlib</AssemblyName> + <AssemblyVersion>4.0.0.0</AssemblyVersion> + <UseECMAKey>true</UseECMAKey> + <!-- do not binplace, this is only used to help compile references + against Windows.winmd. The real mscorlib comes from src/shims/shims.proj --> + <BinPlaceRef>false</BinPlaceRef> + </PropertyGroup> + <ItemGroup> + <Compile Include="TypeForwards.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" /> + </ItemGroup> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> +</Project>
\ No newline at end of file |