Suppress System.Drawing.Common dependency from System.Windows.Extensions (#88157)
authorEric StJohn <ericstj@microsoft.com>
Wed, 5 Jul 2023 16:54:49 +0000 (09:54 -0700)
committerGitHub <noreply@github.com>
Wed, 5 Jul 2023 16:54:49 +0000 (09:54 -0700)
* Suppress System.Drawing.Common dependency from System.Windows.Extensions

* Add Drawing reference to Windows.Extensions tests

src/libraries/System.Windows.Extensions/ref/System.Windows.Extensions.csproj
src/libraries/System.Windows.Extensions/src/System.Windows.Extensions.csproj
src/libraries/System.Windows.Extensions/tests/System.Windows.Extensions.Tests.csproj
src/libraries/testPackages/packageSettings/System.Security.Permissions/settings.targets [new file with mode: 0644]
src/libraries/testPackages/packageSettings/System.Windows.Extensions/settings.targets [new file with mode: 0644]

index f9bd0fe..ea2db0c 100644 (file)
@@ -9,6 +9,7 @@
   </ItemGroup>
 
   <ItemGroup>
-    <PackageReference Include="System.Drawing.Common" Version="$(SystemDrawingCommonVersion)" />
+    <!-- Avoid a PackageReference to System.Drawing.Common this reference is only needed for TypeForwards -->
+    <PackageReference Include="System.Drawing.Common" Version="$(SystemDrawingCommonVersion)" PrivateAssets="All" />
   </ItemGroup>
 </Project>
\ No newline at end of file
index d976d96..952695b 100644 (file)
@@ -93,6 +93,7 @@ System.Security.Cryptography.X509Certificates.X509SelectionFlag</PackageDescript
   </ItemGroup>
 
   <ItemGroup>
-    <PackageReference Include="System.Drawing.Common" Version="$(SystemDrawingCommonVersion)" />
+    <!-- Avoid a PackageReference to System.Drawing.Common this reference is only needed for TypeForwards -->
+    <PackageReference Include="System.Drawing.Common" Version="$(SystemDrawingCommonVersion)" PrivateAssets="All" />
   </ItemGroup>
 </Project>
index 2bbec06..fb79584 100644 (file)
@@ -18,6 +18,7 @@
   </ItemGroup>
   <ItemGroup>
     <PackageReference Include="System.ComponentModel.TypeConverter.TestData" Version="$(SystemComponentModelTypeConverterTestDataVersion)" />
+    <PackageReference Include="System.Drawing.Common" Version="$(SystemDrawingCommonVersion)" />
     <PackageReference Include="System.Drawing.Common.TestData" Version="$(SystemDrawingCommonTestDataVersion)" />
     <PackageReference Include="System.Windows.Extensions.TestData" Version="$(SystemWindowsExtensionsTestDataVersion)" />
     <ProjectReference Include="..\src\System.Windows.Extensions.csproj" />
diff --git a/src/libraries/testPackages/packageSettings/System.Security.Permissions/settings.targets b/src/libraries/testPackages/packageSettings/System.Security.Permissions/settings.targets
new file mode 100644 (file)
index 0000000..2b89fcb
--- /dev/null
@@ -0,0 +1,6 @@
+<Project>
+  <ItemGroup>
+    <!-- intentional dangling ref from System.Windows.Extensions -->
+    <IgnoredReference Include="System.Drawing.Common" />
+  </ItemGroup>
+</Project>
diff --git a/src/libraries/testPackages/packageSettings/System.Windows.Extensions/settings.targets b/src/libraries/testPackages/packageSettings/System.Windows.Extensions/settings.targets
new file mode 100644 (file)
index 0000000..eebdbe5
--- /dev/null
@@ -0,0 +1,6 @@
+<Project>
+  <ItemGroup>
+    <!-- intentional dangling ref -->
+    <IgnoredReference Include="System.Drawing.Common" />
+  </ItemGroup>
+</Project>