-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Filtering down the NETNative TargetingPack to avoid type conflicts #15929
Conversation
|
cc: @jkotas |
external/runtime/runtime.depproj
Outdated
| <TargetingPackReference Include="System.Private.CoreLib" /> | ||
| <TargetingPackReference Include="System.Private.Interop" /> | ||
| <TargetingPackReference Include="System.Private.Threading" /> | ||
| <TargetingPackReference Include="System.Private.CoreLib.WinRTInterop" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should remove System.Private.CoreLib.WinRTInterop as well to completely fix the problem you are seeing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, I kept it because it was needed for one assembly to build, but I'll try to get that project building without that dependency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The project that still references it should build just fine without it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
| </ItemGroup> | ||
| <ItemGroup Condition="'$(TargetGroup)'=='uapaot'"> | ||
| <ReferenceFromRuntime Include="System.Private.CoreLib.Augments" /> | ||
| <ReferenceFromRuntime Include="System.Private.CoreLib" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not right. Instead, you should:
- Delete reference to
<ReferenceFromRuntime Include="System.Private.CoreLib.Augments" />from here - Delete the two
#if NET_NATIVEifdefs from System/Runtime/Serialization/XmlFormatReaderGenerator.cs that you will hit the build breaks for. There does not need to be divergence with CoreCLR anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
| </ItemGroup> | ||
| <ItemGroup Condition="'$(TargetGroup)'=='uapaot'"> | ||
| <ReferenceFromRuntime Include="System.Private.CoreLib.Augments" /> | ||
| <EmbeddedResource Include="$(MsBuildThisFileDirectory)Resources\$(AssemblyName).rd.xml" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reference to rd.xml should stay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
| <SkipFilterTargetingPackResolvedNugetPackages>false</SkipFilterTargetingPackResolvedNugetPackages> | ||
| </PropertyGroup> | ||
| <ItemGroup Condition="'$(TargetGroup)'=='uapaot'"> | ||
| <TargetingPackReference Include="System.Private.CoreLib" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are switching to a newer filtering mechanism see how we filter in netfx.depproj.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, we now use the <FileToExclude Include="..">. I'll revert these changes and put up a PR to move to the new model.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR #15953 addresses this.
…otnet/corefx#15929) Filtering down the NETNative TargetingPack to avoid type conflicts Commit migrated from dotnet/corefx@b2ca211
cc: @weshaggard @MattGal
NETNative TargetingPack contains some implementation assemblies and some reference assemblies which may cause type conflicts at runtime. With this PR we are removing those potential conflicts away.