diff options
author | Eric St. John <ericstj@microsoft.com> | 2017-05-16 00:17:00 +0300 |
---|---|---|
committer | Eric St. John <ericstj@microsoft.com> | 2017-05-16 00:17:00 +0300 |
commit | 81bd3d3050ff134f4acf054fe729691e4a737ac1 (patch) | |
tree | d6cf4e8507df1ffc4f8c045ab66b6a3b509a3229 /pkg | |
parent | 901af62e0ed056f65a1e1e46798d73c71401e0e0 (diff) |
Check for duplicate types in framework packages
Examine framework packages for any duplicate types.
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/Microsoft.Private.CoreFx.UAP/Microsoft.Private.CoreFx.UAP.pkgproj | 2 | ||||
-rw-r--r-- | pkg/frameworkPackage.targets | 19 |
2 files changed, 21 insertions, 0 deletions
diff --git a/pkg/Microsoft.Private.CoreFx.UAP/Microsoft.Private.CoreFx.UAP.pkgproj b/pkg/Microsoft.Private.CoreFx.UAP/Microsoft.Private.CoreFx.UAP.pkgproj index 305ac36403..998f315373 100644 --- a/pkg/Microsoft.Private.CoreFx.UAP/Microsoft.Private.CoreFx.UAP.pkgproj +++ b/pkg/Microsoft.Private.CoreFx.UAP/Microsoft.Private.CoreFx.UAP.pkgproj @@ -35,6 +35,8 @@ <ExcludeFromClosure Include="System.Net" /> <ExcludeFromClosure Include="System.Transactions" /> + <ExcludeFromDuplicateTypes Include="System.Private.Reflection.Metadata.Ecma335" /> + <!-- Permit the following implementation-only assemblies --> <ValidatePackageSuppression Condition="'$(PackageTargetRuntime)' != ''" Include="PermitInbox"> <Value> diff --git a/pkg/frameworkPackage.targets b/pkg/frameworkPackage.targets index ff94fa2fa8..56b2afce17 100644 --- a/pkg/frameworkPackage.targets +++ b/pkg/frameworkPackage.targets @@ -114,6 +114,25 @@ </Target> + <Target Name="VerifyDuplicateTypes" + DependsOnTargets="GetClosureFiles" + AfterTargets="Build" + Inputs="%(ClosureFile.FileSet)" + Outputs="batching-on-FileSet-metadata"> + <ItemGroup> + <_dupTypeFileName Include="@(ClosureFile->'%(FileName)')"> + <Original>%(Identity)</Original> + </_dupTypeFileName> + <_dupTypeFileNamesFiltered Include="@(_dupTypeFileName)" Exclude="@(ExcludeFromDuplicateTypes)"/> + <_dupTypeFileFiltered Include="@(_dupTypeFileNamesFiltered->'%(Original)')"/> + </ItemGroup> + + <Message Importance="High" Text="Verifying no duplicate types in $(Id) %(ClosureFile.FileSet) assemblies" /> + <VerifyTypes Sources="@(_dupTypeFileFiltered)" + IgnoredTypes="@(IgnoredDuplicateType)" /> + + </Target> + <Target Name="VerifyNETStandard" DependsOnTargets="GetClosureFiles" AfterTargets="Build" |