diff options
author | Shin Mao <shmao@microsoft.com> | 2017-06-30 19:31:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-30 19:31:32 +0300 |
commit | f4d12ffbef7ea1c4142f5e039602089b16bb73be (patch) | |
tree | 2afc9e4205c892e95565a3b86f1f9a5191ad5f2b | |
parent | 6d421f28e78fab8c7f9407e737c4b891d1666a4b (diff) |
Move Entries from Library Rd.xml to Test Rd.xml. (#21668)
* Move Entries from Library Rd.xml to Test Rd.xml.
XmlSerializer.Mode iss marked as required by the System.Private.Xml.rd.xml.
Unfortunately, it pulls in the XmlSerializer type itself (has to), which
in turn pulls in a whole lot of code through its static ctor dependencies.
This caused some size-on-disk regressions.
As the property is used by our test project only, the fix is to move the
entry from the library rd.xml to the test rd.xml.
Fix #21667
* Minor changes.
6 files changed, 29 insertions, 4 deletions
diff --git a/src/System.Private.DataContractSerialization/src/Resources/System.Private.DataContractSerialization.rd.xml b/src/System.Private.DataContractSerialization/src/Resources/System.Private.DataContractSerialization.rd.xml index 7946e90a95..03ab7e782e 100644 --- a/src/System.Private.DataContractSerialization/src/Resources/System.Private.DataContractSerialization.rd.xml +++ b/src/System.Private.DataContractSerialization/src/Resources/System.Private.DataContractSerialization.rd.xml @@ -8,7 +8,6 @@ <TypeParameter Name="type" DataContractSerializer="Public"/> <TypeEnumerableParameter Name="knownTypes" DataContractSerializer="Public"/> </Method> - <Property Name="Option" Dynamic="Required" /> </Type> <Type Name="KeyValuePairAdapter`2" Dynamic="Required All" /> <!-- Reflection-based serialization requires the entries below. --> diff --git a/src/System.Private.Xml/src/Resources/System.Private.Xml.rd.xml b/src/System.Private.Xml/src/Resources/System.Private.Xml.rd.xml index bd831e7868..1868e02d21 100644 --- a/src/System.Private.Xml/src/Resources/System.Private.Xml.rd.xml +++ b/src/System.Private.Xml/src/Resources/System.Private.Xml.rd.xml @@ -12,11 +12,8 @@ <TypeParameter Name="type" XmlSerializer="Public"/> <TypeEnumerableParameter Name="extraTypes" Dynamic="Public"/> </Method> - <Property Name="Mode" Dynamic="Required" /> </Type> <Type Name="ReflectionXmlSerializationReaderHelper" Dynamic="Required All" /> - <!--<Method Name="GetSetMemberValueDelegateWithType{TObj, TParam}" Dynamic="Required" /> - </Type>--> </Namespace> <Namespace Name="System.Xml.Schema" Dynamic="Public" /> </Assembly> diff --git a/src/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/Resources/System.Xml.XmlSerializer.ReflectionOnly.Tests.rd.xml b/src/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/Resources/System.Xml.XmlSerializer.ReflectionOnly.Tests.rd.xml new file mode 100644 index 0000000000..ce1b8fae82 --- /dev/null +++ b/src/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/Resources/System.Xml.XmlSerializer.ReflectionOnly.Tests.rd.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8" ?> +<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata"> + <Library Name="System.Xml.XmlSerializer.ReflectionOnly.Tests"> + <Assembly Name="System.Private.Xml"> + <Namespace Name="System.Xml.Serialization"> + <Type Name="XmlSerializer"> + <Property Name="Mode" Dynamic="Required" /> + </Type> + </Namespace> + </Assembly> + </Library> +</Directives> diff --git a/src/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/System.Xml.XmlSerializer.ReflectionOnly.Tests.csproj b/src/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/System.Xml.XmlSerializer.ReflectionOnly.Tests.csproj index 8b21dd7846..7a31b6c5d9 100644 --- a/src/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/System.Xml.XmlSerializer.ReflectionOnly.Tests.csproj +++ b/src/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/System.Xml.XmlSerializer.ReflectionOnly.Tests.csproj @@ -23,5 +23,8 @@ <Link>CommonTest\System\PlatformDetection.cs</Link> </Compile> </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" /> + </ItemGroup> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> </Project>
\ No newline at end of file diff --git a/src/System.Runtime.Serialization.Json/tests/ReflectionOnly/Resources/System.Runtime.Serialization.Json.ReflectionOnly.Tests.rd.xml b/src/System.Runtime.Serialization.Json/tests/ReflectionOnly/Resources/System.Runtime.Serialization.Json.ReflectionOnly.Tests.rd.xml index f4d3e425d7..a0528677a4 100644 --- a/src/System.Runtime.Serialization.Json/tests/ReflectionOnly/Resources/System.Runtime.Serialization.Json.ReflectionOnly.Tests.rd.xml +++ b/src/System.Runtime.Serialization.Json/tests/ReflectionOnly/Resources/System.Runtime.Serialization.Json.ReflectionOnly.Tests.rd.xml @@ -1,6 +1,13 @@ <?xml version="1.0" encoding="utf-8" ?> <Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata"> <Library Name="*System.Runtime.Serialization.Json.ReflectionOnly.Tests*"> + <Assembly Name="System.Private.DataContractSerialization"> + <Namespace Name="System.Runtime.Serialization"> + <Type Name="DataContractSerializer"> + <Property Name="Option" Dynamic="Required" /> + </Type> + </Namespace> + </Assembly> <Namespace Name="System.Collections"> <Type Name="ArrayList" Dynamic="Required All" /> <Type Name="IList" Dynamic="Required All" /> diff --git a/src/System.Runtime.Serialization.Xml/tests/ReflectionOnly/Resources/System.Runtime.Serialization.Xml.ReflectionOnly.Tests.rd.xml b/src/System.Runtime.Serialization.Xml/tests/ReflectionOnly/Resources/System.Runtime.Serialization.Xml.ReflectionOnly.Tests.rd.xml index fda8079424..969d1fe150 100644 --- a/src/System.Runtime.Serialization.Xml/tests/ReflectionOnly/Resources/System.Runtime.Serialization.Xml.ReflectionOnly.Tests.rd.xml +++ b/src/System.Runtime.Serialization.Xml/tests/ReflectionOnly/Resources/System.Runtime.Serialization.Xml.ReflectionOnly.Tests.rd.xml @@ -1,6 +1,13 @@ <?xml version="1.0" encoding="utf-8" ?> <Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata"> <Library Name="*System.Runtime.Serialization.Xml.ReflectionOnly.Tests*"> + <Assembly Name="System.Private.DataContractSerialization"> + <Namespace Name="System.Runtime.Serialization"> + <Type Name="DataContractSerializer"> + <Property Name="Option" Dynamic="Required" /> + </Type> + </Namespace> + </Assembly> <Namespace Name="System.Collections"> <Type Name="ArrayList" Dynamic="Required All" /> <Type Name="IList" Dynamic="Required All" /> |