Skip to content

Commit a4f24b6

Browse files
authored
Merge pull request #2011 from dotnet/dev/roladuca/missingfwds30
Fix missing type forwards in reference assemblies (3.0 port)
2 parents d412102 + b38032d commit a4f24b6

File tree

14 files changed

+20
-199
lines changed

14 files changed

+20
-199
lines changed

src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/System.Xaml-ref-Net48.baseline.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ CannotRemoveBaseTypeOrInterface : Type 'System.Windows.Markup.TrimSurroundingWhi
1616
CannotRemoveAttribute : Attribute 'System.ComponentModel.TypeConverterAttribute' exists on 'System.Windows.Markup.TypeExtension' in the contract but not the implementation.
1717
CannotRemoveBaseTypeOrInterface : Type 'System.Windows.Markup.UidPropertyAttribute' does not implement interface 'System.Runtime.InteropServices._Attribute' in the implementation but it does in the contract.
1818
CannotRemoveBaseTypeOrInterface : Type 'System.Windows.Markup.UsableDuringInitializationAttribute' does not implement interface 'System.Runtime.InteropServices._Attribute' in the implementation but it does in the contract.
19-
TypesMustExist : Type 'System.Windows.Markup.ValueSerializerAttribute' does not exist in the implementation but it does exist in the contract.
19+
CannotRemoveBaseTypeOrInterface : Type 'System.Windows.Markup.ValueSerializerAttribute' does not implement interface 'System.Runtime.InteropServices._Attribute' in the implementation but it does in the contract.
2020
CannotRemoveBaseTypeOrInterface : Type 'System.Windows.Markup.WhitespaceSignificantCollectionAttribute' does not implement interface 'System.Runtime.InteropServices._Attribute' in the implementation but it does in the contract.
2121
CannotRemoveBaseTypeOrInterface : Type 'System.Windows.Markup.XamlDeferLoadAttribute' does not implement interface 'System.Runtime.InteropServices._Attribute' in the implementation but it does in the contract.
2222
CannotRemoveBaseTypeOrInterface : Type 'System.Windows.Markup.XamlSetMarkupExtensionAttribute' does not implement interface 'System.Runtime.InteropServices._Attribute' in the implementation but it does in the contract.

src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/WindowsBase-ref-Net48.baseline.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
Compat issues with assembly WindowsBase:
2-
TypesMustExist : Type 'System.Collections.ObjectModel.ObservableCollection<T>' does not exist in the implementation but it does exist in the contract.
3-
TypesMustExist : Type 'System.Collections.ObjectModel.ReadOnlyObservableCollection<T>' does not exist in the implementation but it does exist in the contract.
4-
TypesMustExist : Type 'System.Collections.Specialized.INotifyCollectionChanged' does not exist in the implementation but it does exist in the contract.
5-
TypesMustExist : Type 'System.Collections.Specialized.NotifyCollectionChangedAction' does not exist in the implementation but it does exist in the contract.
6-
TypesMustExist : Type 'System.Collections.Specialized.NotifyCollectionChangedEventArgs' does not exist in the implementation but it does exist in the contract.
7-
TypesMustExist : Type 'System.Collections.Specialized.NotifyCollectionChangedEventHandler' does not exist in the implementation but it does exist in the contract.
82
CannotRemoveBaseTypeOrInterface : Type 'System.ComponentModel.PropertyFilterAttribute' does not implement interface 'System.Runtime.InteropServices._Attribute' in the implementation but it does in the contract.
93
CannotRemoveBaseTypeOrInterface : Type 'System.IO.FileFormatException' does not implement interface 'System.Runtime.InteropServices._Exception' in the implementation but it does in the contract.
104
MembersMustExist : Member 'System.IO.Packaging.Package..ctor(System.IO.FileAccess, System.Boolean)' does not exist in the implementation but it does exist in the contract.
@@ -38,4 +32,4 @@ CannotRemoveBaseTypeOrInterface : Type 'System.Windows.Markup.XmlnsCompatibleWit
3832
CannotRemoveBaseTypeOrInterface : Type 'System.Windows.Markup.XmlnsDefinitionAttribute' does not implement interface 'System.Runtime.InteropServices._Attribute' in the implementation but it does in the contract.
3933
CannotRemoveBaseTypeOrInterface : Type 'System.Windows.Markup.XmlnsPrefixAttribute' does not implement interface 'System.Runtime.InteropServices._Attribute' in the implementation but it does in the contract.
4034
CannotRemoveBaseTypeOrInterface : Type 'System.Windows.Media.DisableDpiAwarenessAttribute' does not implement interface 'System.Runtime.InteropServices._Attribute' in the implementation but it does in the contract.
41-
Total Issues: 39
35+
Total Issues: 33

src/Microsoft.DotNet.Wpf/src/PresentationFramework/otherassemblyattrs.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@
2020
[assembly:TypeForwardedTo(typeof(System.Windows.Markup.NullExtension))]
2121
[assembly:TypeForwardedTo(typeof(System.Windows.Markup.StaticExtension))]
2222
[assembly:TypeForwardedTo(typeof(System.Windows.Markup.TypeExtension))]
23+
24+
// IProvidePropertyFallback is an internal interface and not included in the PresentationCore reference assembly.
25+
// Therefore we need to ensure it's not included in the PresentationFramework reference assembly as it won't be defined there.
26+
#if !PRESENTATION_FRAMEWORK_REF
2327
[assembly:TypeForwardedTo(typeof(System.Windows.Markup.IProvidePropertyFallback))]
28+
#endif
2429

2530
[assembly:InternalsVisibleTo(BuildInfo.PresentationFrameworkRoyale)]
2631
[assembly:InternalsVisibleTo(BuildInfo.PresentationFrameworkLuna)]

src/Microsoft.DotNet.Wpf/src/PresentationFramework/ref/PresentationFramework-ref.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<AssemblyName>PresentationFramework</AssemblyName>
44
<PackageId>PresentationFramework-ref</PackageId>
55
<TargetOutputRelPath>$(TargetGroup)-$(PackageId)/</TargetOutputRelPath>
6-
<DefineConstants>$(DefineConstants);FRAMEWORK_NATIVEMETHODS;COMMONDPS;PRESENTATIONFRAMEWORK_ONLY;PRESENTATIONFRAMEWORK;RIBBON_IN_FRAMEWORK</DefineConstants>
6+
<DefineConstants>$(DefineConstants);FRAMEWORK_NATIVEMETHODS;COMMONDPS;PRESENTATIONFRAMEWORK_ONLY;PRESENTATIONFRAMEWORK;RIBBON_IN_FRAMEWORK;PRESENTATION_FRAMEWORK_REF</DefineConstants>
77
<DefineConstants Condition="'$(WeakEventTelemetry)'=='true'">$(DefineConstants);WeakEventTelemetry</DefineConstants>
88
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
99
<EnablePInvokeAnalyzer>false</EnablePInvokeAnalyzer>
@@ -17,6 +17,7 @@
1717
<ItemGroup>
1818
<Compile Include="$(WpfSharedDir)RefAssemblyAttrs.cs" />
1919
<Compile Include="$(WpfSharedDir)ref\AttributesForReferenceAssemblies.cs" />
20+
<Compile Include="$(WpfSourceDir)PresentationFramework\OtherAssemblyAttrs.cs" />
2021
</ItemGroup>
2122

2223
<ItemGroup>

src/Microsoft.DotNet.Wpf/src/PresentationFramework/ref/otherassemblyattrs.cs

Lines changed: 0 additions & 107 deletions
This file was deleted.

src/Microsoft.DotNet.Wpf/src/PresentationUI/ref/PresentationUI-ref.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<ItemGroup>
1111
<Compile Include="$(WpfSharedDir)RefAssemblyAttrs.cs" />
1212
<Compile Include="$(WpfSharedDir)ref\AttributesForReferenceAssemblies.cs" />
13+
<Compile Include="$(WpfSourceDir)PresentationUI\OtherAssemblyAttrs.cs" />
1314
</ItemGroup>
1415
<ItemGroup>
1516
<NetCoreReference Include="netstandard" />
@@ -20,6 +21,7 @@
2021
<NetCoreReference Include="System.Runtime.InteropServices" />
2122
<NetCoreReference Include="System.Resources.ResourceManager" />
2223

23-
<ProjectReference Include="$(WpfSourceDir)WindowsBase\WindowsBase.csproj" />
24+
<ProjectReference Include="$(WpfSourceDir)WindowsBase\ref\WindowsBase-ref.csproj" />
25+
<ProjectReference Include="$(WpfSourceDir)PresentationFramework\ref\PresentationFramework-ref.csproj" />
2426
</ItemGroup>
2527
</Project>

src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ValueSerializerAttribute.cs

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/Microsoft.DotNet.Wpf/src/System.Xaml/otherassemblyattrs.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515

1616
[assembly: TypeForwardedTo(typeof(System.Xaml.Permissions.XamlAccessLevel))]
1717
[assembly: TypeForwardedTo(typeof(System.Xaml.Permissions.XamlLoadPermission))]
18+
[assembly: TypeForwardedTo(typeof(System.Windows.Markup.ValueSerializerAttribute))]
1819

1920
[assembly:XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml", "System.Windows.Markup")]

src/Microsoft.DotNet.Wpf/src/WindowsBase/OtherAssemblyAttrs.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@
9494
[assembly: TypeForwardedTo(typeof(System.Security.Permissions.WebBrowserPermission))]
9595
[assembly: TypeForwardedTo(typeof(System.Security.Permissions.WebBrowserPermissionAttribute))]
9696

97+
[assembly: TypeForwardedTo(typeof(System.Collections.ObjectModel.ReadOnlyObservableCollection<>))]
98+
[assembly: TypeForwardedTo(typeof(System.Collections.ObjectModel.ObservableCollection<>))]
99+
[assembly: TypeForwardedTo(typeof(System.Collections.Specialized.NotifyCollectionChangedAction))]
100+
[assembly: TypeForwardedTo(typeof(System.Collections.Specialized.NotifyCollectionChangedEventArgs))]
101+
[assembly: TypeForwardedTo(typeof(System.Collections.Specialized.NotifyCollectionChangedEventHandler))]
102+
[assembly: TypeForwardedTo(typeof(System.Collections.Specialized.INotifyCollectionChanged))]
103+
97104
// XAML namespace definitions
98105
[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows")]
99106
[assembly:System.Windows.Markup.XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "System.Windows.Input")]

src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Collections/ObjectModel/ObservableCollection.cs

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)