Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve P2P handling for cross-targeting #1621

Merged
merged 1 commit into from
Jan 27, 2017

Conversation

nguerrera
Copy link
Contributor

@nguerrera nguerrera commented Jan 27, 2017

  1. Deal with UWP case where NugetTargetMoniker is needed instead of TargetFrameworkMoniker
  2. Provide mechanism to override the moniker that is passed to reference
  3. Provide mechanism to pick any target framework of reference
  4. Provide mechanism to skip the best TFM computation for known single-targeting case

@AndyGerlicher @rainersigwald

Customer scenario

Primary:
Referencing an SDK/CPS-based project from UWP project would behave incorrectly (pick wrong TFM of reference) or fail with incorrect incompatibility error.

Also:

  • There was no supported way to override the moniker sent to refs.
  • There was no supported way to pick a different TFM than the one selected by the SDK for a cross-targeted ref, but sometimes you want to test a different one than the one deemed best for the caller.
  • There was no supported way to turn off the cross-targeting protocol if you know ref is single targeted (which can now be used to improve performance if needed).

Bugs this fixes:
#1474
#1390
dotnet/sdk#707
dotnet/project-system#477

Risk

Low.

Performance impact

Negligible.

Is this a regression from a previous update?

No.

Root cause analysis:

We missed the special cases around monikers for UWP.

How was the bug found?

Customer reported

1. Deal with UWP case where NugetTargetMoniker is needed instead of TargetFrameworkMoniker
2. Provide mechanism to override the moniker that is passed to reference
3. Provide mechanism to pick any target framework of reference
4. Provide mechanism to skip the best TFM computation for known single-targeting case
@nguerrera
Copy link
Contributor Author

@srivatsn

than one framework.
-->
<ItemGroup>
<_MSBuildProjectReferenceExistent Condition="'%(_MSBuildProjectReferenceExistent.SkipGetTargetFrameworkProperties)' == '' and '%(Extension)' == '.vcxproj'">
Copy link
Contributor

@AndyGerlicher AndyGerlicher Jan 27, 2017

Choose a reason for hiding this comment

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

Should this be or vcxproj? (instead of and)

Copy link
Member

Choose a reason for hiding this comment

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

Makes sense to be able to opt into the double-eval even for a vcxproj if you really want to.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. Intentional.

Copy link
Contributor

Choose a reason for hiding this comment

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

Read that wrong. Read that as explicit skip and vcxproj.

than one framework.
-->
<ItemGroup>
<_MSBuildProjectReferenceExistent Condition="'%(_MSBuildProjectReferenceExistent.SkipGetTargetFrameworkProperties)' == '' and '%(Extension)' == '.vcxproj'">
Copy link
Member

Choose a reason for hiding this comment

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

Makes sense to be able to opt into the double-eval even for a vcxproj if you really want to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants