Skip to content

Commit 5452886

Browse files
committed
[System.Drawing.Primitives] Add System.Drawing.Primitives.dll Facade
Xamarin.Android needs to support [.NET Standard 1.6][0], which mentions a [`System.Drawing.Primitives.dll` assembly][1] which has not previously been supported or shipped. `System.Drawing.Primitives.dll` contains `System.Drawing.Point` and related typees, which Xamarin.Android places into `Mono.Android.dll`. Add a new `System.Drawing.Primitives.dll` assembly to use as a *facade assembly*, which contains [type forwarders][2] to "redirect" the types from `System.Drawing.Primitives.dll` to the corresponding types within `Mono.Android.dll`. [0]: https://docs.microsoft.com/en-us/dotnet/articles/core/tutorials/libraries [1]: https://github.com/dotnet/corefx/blob/master/Documentation/architecture/net-platform-standard.md#list-of-net-corefx-apis-and-their-associated-net-platform-standard-version [2]: https://msdn.microsoft.com/en-us/library/ms404275(v=vs.110).aspx
1 parent 1cb271e commit 5452886

3 files changed

Lines changed: 122 additions & 0 deletions

File tree

Xamarin.Android.sln

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK", "src\OpenTK-1.0\Op
8383
EndProject
8484
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "libZipSharp", "external\LibZipSharp\libZipSharp.csproj", "{E248B2CA-303B-4645-ADDC-9D4459D550FD}"
8585
EndProject
86+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Drawing.Primitives", "src\System.Drawing.Primitives\System.Drawing.Primitives.csproj", "{C9FF2E4D-D927-479E-838B-647C16763F64}"
87+
EndProject
8688
Global
8789
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8890
Debug|AnyCPU = Debug|AnyCPU
@@ -378,6 +380,14 @@ Global
378380
{E248B2CA-303B-4645-ADDC-9D4459D550FD}.XAIntegrationDebug|Any CPU.Build.0 = Debug|Any CPU
379381
{E248B2CA-303B-4645-ADDC-9D4459D550FD}.XAIntegrationRelease|Any CPU.ActiveCfg = Debug|Any CPU
380382
{E248B2CA-303B-4645-ADDC-9D4459D550FD}.XAIntegrationRelease|Any CPU.Build.0 = Debug|Any CPU
383+
{C9FF2E4D-D927-479E-838B-647C16763F64}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
384+
{C9FF2E4D-D927-479E-838B-647C16763F64}.Debug|AnyCPU.Build.0 = Debug|Any CPU
385+
{C9FF2E4D-D927-479E-838B-647C16763F64}.Release|AnyCPU.ActiveCfg = Release|Any CPU
386+
{C9FF2E4D-D927-479E-838B-647C16763F64}.Release|AnyCPU.Build.0 = Release|Any CPU
387+
{C9FF2E4D-D927-479E-838B-647C16763F64}.XAIntegrationDebug|AnyCPU.ActiveCfg = Debug|Any CPU
388+
{C9FF2E4D-D927-479E-838B-647C16763F64}.XAIntegrationDebug|AnyCPU.Build.0 = Debug|Any CPU
389+
{C9FF2E4D-D927-479E-838B-647C16763F64}.XAIntegrationRelease|AnyCPU.ActiveCfg = Debug|Any CPU
390+
{C9FF2E4D-D927-479E-838B-647C16763F64}.XAIntegrationRelease|AnyCPU.Build.0 = Debug|Any CPU
381391
EndGlobalSection
382392
GlobalSection(NestedProjects) = preSolution
383393
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA} = {E351F97D-EA4F-4E7F-AAA0-8EBB1F2A4A62}
@@ -417,6 +427,7 @@ Global
417427
{5EB9E888-E357-417E-9F39-DDEC195CE47F} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
418428
{900A0F71-BAAD-417A-8D1A-8D330297CDD0} = {E351F97D-EA4F-4E7F-AAA0-8EBB1F2A4A62}
419429
{E248B2CA-303B-4645-ADDC-9D4459D550FD} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
430+
{C9FF2E4D-D927-479E-838B-647C16763F64} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
420431
EndGlobalSection
421432
GlobalSection(MonoDevelopProperties) = preSolution
422433
Policies = $0
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
4+
// Information about this assembly is defined by the following attributes.
5+
// Change them to the values specific to your project.
6+
7+
[assembly: AssemblyTitle ("System.Drawing.Primitives")]
8+
[assembly: AssemblyDescription ("")]
9+
[assembly: AssemblyConfiguration ("")]
10+
[assembly: AssemblyCompany ("Microsoft Corporation")]
11+
[assembly: AssemblyProduct ("")]
12+
[assembly: AssemblyCopyright ("Microsoft Corporation")]
13+
[assembly: AssemblyTrademark ("Microsoft Corporation")]
14+
[assembly: AssemblyCulture ("")]
15+
16+
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17+
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
18+
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
19+
20+
[assembly: AssemblyVersion ("1.0.*")]
21+
22+
// The following attributes are used to specify the signing key for the assembly,
23+
// if desired. See the Mono documentation for more information about signing.
24+
25+
//[assembly: AssemblyDelaySign(false)]
26+
//[assembly: AssemblyKeyFile("")]
27+
28+
// Assembly forwards
29+
[assembly: TypeForwardedTo (typeof (System.Drawing.Point))]
30+
[assembly: TypeForwardedTo (typeof (System.Drawing.PointF))]
31+
[assembly: TypeForwardedTo (typeof (System.Drawing.Rectangle))]
32+
[assembly: TypeForwardedTo (typeof (System.Drawing.RectangleF))]
33+
[assembly: TypeForwardedTo (typeof (System.Drawing.Size))]
34+
[assembly: TypeForwardedTo (typeof (System.Drawing.SizeF))]
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
7+
<ProjectGuid>{C9FF2E4D-D927-479E-838B-647C16763F64}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<RootNamespace>System.Drawing</RootNamespace>
10+
<AssemblyName>System.Drawing.Primitives</AssemblyName>
11+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
12+
<TargetFrameworkProfile>Profile78</TargetFrameworkProfile>
13+
<NoStdLib>true</NoStdLib>
14+
</PropertyGroup>
15+
<Import Project="..\..\Configuration.props" />
16+
<PropertyGroup>
17+
<TargetFrameworkVersion>$(AndroidFrameworkVersion)</TargetFrameworkVersion>
18+
<AssemblyOriginatorKeyFile>$(MonoSourceFullPath)\mcs\class\mono.pub</AssemblyOriginatorKeyFile>
19+
</PropertyGroup>
20+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
21+
<DebugSymbols>true</DebugSymbols>
22+
<DebugType>full</DebugType>
23+
<Optimize>false</Optimize>
24+
<OutputPath>..\..\bin\$(Configuration)\lib\xbuild-frameworks\MonoAndroid\v1.0\Facades</OutputPath>
25+
<DefineConstants>DEBUG;</DefineConstants>
26+
<ErrorReport>prompt</ErrorReport>
27+
<WarningLevel>4</WarningLevel>
28+
<ConsolePause>false</ConsolePause>
29+
<NoStdLib>false</NoStdLib>
30+
</PropertyGroup>
31+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
32+
<Optimize>true</Optimize>
33+
<OutputPath>..\..\bin\$(Configuration)\lib\xbuild-frameworks\MonoAndroid\v1.0\Facades</OutputPath>
34+
<ErrorReport>prompt</ErrorReport>
35+
<WarningLevel>4</WarningLevel>
36+
<ConsolePause>false</ConsolePause>
37+
<NoStdLib>false</NoStdLib>
38+
</PropertyGroup>
39+
<ItemGroup>
40+
<Reference Include="mscorlib">
41+
<HintPath>$(OutputPath)..\mscorlib.dll</HintPath>
42+
<Private>False</Private>
43+
</Reference>
44+
<Reference Include="System">
45+
<HintPath>$(OutputPath)..\System.dll</HintPath>
46+
<Private>False</Private>
47+
</Reference>
48+
<Reference Include="System.Core">
49+
<HintPath>$(OutputPath)..\System.Core.dll</HintPath>
50+
<Private>False</Private>
51+
</Reference>
52+
<Reference Include="System.Xml">
53+
<HintPath>$(OutputPath)..\System.Xml.dll</HintPath>
54+
<Private>False</Private>
55+
</Reference>
56+
<Reference Include="Java.Interop">
57+
<HintPath>$(OutputPath)..\Java.Interop.dll</HintPath>
58+
<Private>False</Private>
59+
</Reference>
60+
</ItemGroup>
61+
<ItemGroup>
62+
<Compile Include="Properties\AssemblyInfo.cs" />
63+
</ItemGroup>
64+
<Import Project="$(OutputPath)\..\..\..\..\xbuild\Xamarin\Android\Xamarin.Android.CSharp.targets" />
65+
<ItemGroup>
66+
<ProjectReference Include="..\Mono.Android\Mono.Android.csproj">
67+
<Project>{66CF299A-CE95-4131-BCD8-DB66E30C4BF7}</Project>
68+
<Name>Mono.Android</Name>
69+
<Private>False</Private>
70+
</ProjectReference>
71+
<ProjectReference Include="..\Xamarin.Android.Build.Tasks\Xamarin.Android.Build.Tasks.csproj">
72+
<Project>{3F1F2F50-AF1A-4A5A-BEDB-193372F068D7}</Project>
73+
<Name>Xamarin.Android.Build.Tasks</Name>
74+
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
75+
</ProjectReference>
76+
</ItemGroup>
77+
</Project>

0 commit comments

Comments
 (0)