Skip to content

Commit

Permalink
Ensure WPF builds against framework SRSF version (dotnet#9492)
Browse files Browse the repository at this point in the history
WPF was depending on the package version of
System.Runtime.Serialization.Formatters but never shipping it.
�Instead WPF should depend on the built-in assembly version.
To do that we need to update the SDK version since WPF's vcxprojs don't
enable the nuget package targeting pack dotnet#9490
  • Loading branch information
pchaurasia14 committed Aug 1, 2024
1 parent 9bd5796 commit ec9d092
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 15 deletions.
1 change: 0 additions & 1 deletion eng/WpfArcadeSdk/tools/TestProjects.targets
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
<PackageReference Include="Microsoft.Win32.Registry" Version="$(MicrosoftWin32RegistryPackageVersion)" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerPackageVersion)" CopyLocal="true" />
<PackageReference Include="System.Diagnostics.EventLog" Version="$(SystemDiagnosticsEventLogPackageVersion)" CopyLocal="true" />
<PackageReference Include="System.Runtime.Serialization.Formatters" Version="$(SystemRuntimeSerializationFormattersPackageVersion)" CopyLocal="true" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="$(SystemSecurityCryptographyXmlPackageVersion)" CopyLocal="true" />
<PackageReference Include="System.Windows.Extensions" Version="$(SystemWindowsExtensionsPackageVersion)" CopyLocal="true" />

Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"tools": {
"dotnet": "9.0.100-preview.5.24307.3",
"dotnet": "9.0.100-preview.6.24328.19",
"runtimes": {
"dotnet": [
"2.1.7",
Expand All @@ -16,7 +16,7 @@
"Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24368.9"
},
"sdk": {
"version": "9.0.100-preview.5.24307.3"
"version": "9.0.100-preview.6.24328.19"
},
"native-tools": {
"strawberry-perl": "5.38.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1452,6 +1452,7 @@
<NetCoreReference Include="System.Runtime.CompilerServices.VisualC" />
<NetCoreReference Include="System.Runtime.Extensions" />
<NetCoreReference Include="System.Runtime.InteropServices" />
<NetCoreReference Include="System.Runtime.Serialization.Formatters" />
<NetCoreReference Include="System.Text.Encoding.Extensions" />
<NetCoreReference Include="System.Text.RegularExpressions" />
<NetCoreReference Include="System.Threading" />
Expand All @@ -1467,8 +1468,6 @@

<ItemGroup>
<PackageReference Include="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerPackageVersion)" />
<!-- PrivateAssets metadata is required as Packaging.props in WpfArcadeSdk unconditionally sets it to all which is wrong: https://github.com/dotnet/wpf/issues/9261. -->
<PackageReference Include="System.Runtime.Serialization.Formatters" Version="$(SystemRuntimeSerializationFormattersPackageVersion)" PrivateAssets="contentfiles;analyzers;build" />
<PackageReference Include="System.Windows.Extensions" Version="$(SystemWindowsExtensionsPackageVersion)" />
<PackageReference Include="$(SystemIOPackagingPackage)" Version="$(SystemIOPackagingVersion)" />
<PackageReference Include="System.Formats.Nrbf" Version="$(SystemFormatsNrbfVersion)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<NetCoreReference Include="System.Runtime.CompilerServices.VisualC" />
<NetCoreReference Include="System.Runtime.Extensions" />
<NetCoreReference Include="System.Runtime.InteropServices" />
<NetCoreReference Include="System.Runtime.Serialization.Formatters" />
<NetCoreReference Include="System.Text.Encoding.Extensions" />
<NetCoreReference Include="System.Text.RegularExpressions" />
<NetCoreReference Include="System.Threading" />
Expand All @@ -62,8 +63,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerPackageVersion)" />
<!-- PrivateAssets metadata is required as Packaging.props in WpfArcadeSdk unconditionally sets it to all which is wrong: https://github.com/dotnet/wpf/issues/9261. -->
<PackageReference Include="System.Runtime.Serialization.Formatters" Version="$(SystemRuntimeSerializationFormattersPackageVersion)" PrivateAssets="contentfiles;analyzers;build" />
<PackageReference Include="System.Windows.Extensions" Version="$(SystemWindowsExtensionsPackageVersion)" />
<PackageReference Include="$(SystemIOPackagingPackage)" Version="$(SystemIOPackagingVersion)" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1406,6 +1406,7 @@
<NetCoreReference Include="System.Resources.ResourceManager" />
<NetCoreReference Include="System.Runtime.CompilerServices.DynamicAttribute" />
<NetCoreReference Include="System.Runtime.InteropServices" />
<NetCoreReference Include="System.Runtime.Serialization.Formatters" />
<NetCoreReference Include="System.Text.RegularExpressions" />
<NetCoreReference Include="System.Threading" />
<NetCoreReference Include="System.Threading.Tasks" />
Expand Down Expand Up @@ -1450,8 +1451,6 @@

<ItemGroup>
<PackageReference Include="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerPackageVersion)" />
<!-- PrivateAssets metadata is required as Packaging.props in WpfArcadeSdk unconditionally sets it to all which is wrong: https://github.com/dotnet/wpf/issues/9261. -->
<PackageReference Include="System.Runtime.Serialization.Formatters" Version="$(SystemRuntimeSerializationFormattersPackageVersion)" PrivateAssets="contentfiles;analyzers;build" />
<PackageReference Include="System.Windows.Extensions" Version="$(SystemWindowsExtensionsPackageVersion)" />
<PackageReference Include="$(SystemIOPackagingPackage)" Version="$(SystemIOPackagingVersion)" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
<NetCoreReference Include="System.Resources.ResourceManager" />
<NetCoreReference Include="System.Runtime.CompilerServices.DynamicAttribute" />
<NetCoreReference Include="System.Runtime.InteropServices" />
<NetCoreReference Include="System.Runtime.Serialization.Formatters" />
<NetCoreReference Include="System.Text.RegularExpressions" />
<NetCoreReference Include="System.Threading" />
<NetCoreReference Include="System.Threading.Tasks" />
Expand Down Expand Up @@ -89,8 +90,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerPackageVersion)" />
<!-- PrivateAssets metadata is required as Packaging.props in WpfArcadeSdk unconditionally sets it to all which is wrong: https://github.com/dotnet/wpf/issues/9261. -->
<PackageReference Include="System.Runtime.Serialization.Formatters" Version="$(SystemRuntimeSerializationFormattersPackageVersion)" PrivateAssets="contentfiles;analyzers;build" />
<PackageReference Include="System.Windows.Extensions" Version="$(SystemWindowsExtensionsPackageVersion)" />
<PackageReference Include="$(SystemIOPackagingPackage)" Version="$(SystemIOPackagingVersion)" />
</ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions src/Microsoft.DotNet.Wpf/src/System.Xaml/System.Xaml.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
<NetCoreReference Include="System.Reflection" />
<NetCoreReference Include="System.Runtime.Extensions" />
<NetCoreReference Include="System.Runtime.InteropServices" />
<NetCoreReference Include="System.Runtime.Serialization.Formatters" />
<NetCoreReference Include="System.Text.Encoding" />
<NetCoreReference Include="System.Text.Encoding.Extensions" />
<NetCoreReference Include="System.Threading" />
Expand All @@ -121,8 +122,6 @@
<NetCoreReference Include="System.Xml.ReaderWriter" />
</ItemGroup>
<ItemGroup>
<!-- PrivateAssets metadata is required as Packaging.props in WpfArcadeSdk unconditionally sets it to all which is wrong: https://github.com/dotnet/wpf/issues/9261. -->
<PackageReference Include="System.Runtime.Serialization.Formatters" Version="$(SystemRuntimeSerializationFormattersPackageVersion)" PrivateAssets="contentfiles;analyzers;build" />
<PackageReference Include="System.Security.Permissions" Version="$(SystemSecurityPermissionsPackageVersion)" />
<PackageReference Include="System.Windows.Extensions" Version="$(SystemWindowsExtensionsPackageVersion)" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<NetCoreReference Include="System.Reflection" />
<NetCoreReference Include="System.Runtime.Extensions" />
<NetCoreReference Include="System.Runtime.InteropServices" />
<NetCoreReference Include="System.Runtime.Serialization.Formatters" />
<NetCoreReference Include="System.Text.Encoding" />
<NetCoreReference Include="System.Text.Encoding.Extensions" />
<NetCoreReference Include="System.Threading" />
Expand All @@ -48,8 +49,6 @@
<NetCoreReference Include="System.Xml.ReaderWriter" />
</ItemGroup>
<ItemGroup>
<!-- PrivateAssets metadata is required as Packaging.props in WpfArcadeSdk unconditionally sets it to all which is wrong: https://github.com/dotnet/wpf/issues/9261. -->
<PackageReference Include="System.Runtime.Serialization.Formatters" Version="$(SystemRuntimeSerializationFormattersPackageVersion)" PrivateAssets="contentfiles;analyzers;build" />
<PackageReference Include="System.Security.Permissions" Version="$(SystemSecurityPermissionsPackageVersion)" />
<PackageReference Include="System.Windows.Extensions" Version="$(SystemWindowsExtensionsPackageVersion)" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<PackageReference Include="System.Runtime.Serialization.Formatters" Version="9.0.0-preview.7.24359.11 " />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerPackageVersion)" />
<PackageReference Include="System.Formats.Nrbf" Version="$(SystemFormatsNrbfVersion)" />
<PackageReference Include="System.Runtime.Serialization.Formatters" Version="$(SystemRuntimeSerializationFormattersPackageVersion)" />
</ItemGroup>

</Project>

0 comments on commit ec9d092

Please sign in to comment.