Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

@joperezr
Copy link
Member

@joperezr joperezr commented Feb 7, 2017

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.

@joperezr
Copy link
Member Author

joperezr commented Feb 7, 2017

cc: @jkotas

<TargetingPackReference Include="System.Private.CoreLib" />
<TargetingPackReference Include="System.Private.Interop" />
<TargetingPackReference Include="System.Private.Threading" />
<TargetingPackReference Include="System.Private.CoreLib.WinRTInterop" />
Copy link
Member

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.

Copy link
Member Author

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

Copy link
Member

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.

Copy link
Member Author

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" />
Copy link
Member

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_NATIVE ifdefs from System/Runtime/Serialization/XmlFormatReaderGenerator.cs that you will hit the build breaks for. There does not need to be divergence with CoreCLR anymore.

Copy link
Member Author

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" />
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@joperezr joperezr merged commit b2ca211 into dotnet:master Feb 8, 2017
@joperezr joperezr deleted the RemoveAugments branch February 8, 2017 00:10
<SkipFilterTargetingPackResolvedNugetPackages>false</SkipFilterTargetingPackResolvedNugetPackages>
</PropertyGroup>
<ItemGroup Condition="'$(TargetGroup)'=='uapaot'">
<TargetingPackReference Include="System.Private.CoreLib" />
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR #15953 addresses this.

@karelz karelz modified the milestone: 2.0.0 Feb 9, 2017
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…otnet/corefx#15929)

Filtering down the NETNative TargetingPack to avoid type conflicts

Commit migrated from dotnet/corefx@b2ca211
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants