-
Notifications
You must be signed in to change notification settings - Fork 695
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
Add restore support for C++/CLI .NET Core projects #4076
Conversation
fcc7f80
to
ada28c0
Compare
|
||
return MSBuildProjectFrameworkUtility.GetProjectFramework( | ||
projectFullPath, | ||
targetFrameworkMoniker, | ||
targetPlatformMoniker, | ||
targetPlatformMinVersion); | ||
targetPlatformMinVersion, | ||
clrSupport); |
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 nomination code that handles the VS side.
@@ -465,6 +465,11 @@ public class SourceRepositoryDependencyProvider : IRemoteDependencyProvider | |||
targetFramework, | |||
item => item.TargetFramework); | |||
|
|||
if (dependencyGroup == null && DeconstructFallbackFrameworks(targetFramework) is DualCompatibilityFramework dualCompatibilityFramework) |
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 handles the dependencies selection with dual compat framework.
@@ -152,6 +152,11 @@ internal static List<List<SelectionCriteria>> CreateOrderedCriteriaSets(RestoreT | |||
{ | |||
// Add the root project framework first. | |||
orderedCriteriaSets.Add(CreateCriteria(targetGraph, assetTargetFallback.RootFramework)); | |||
// Add the secondary framework if dual compatibility framework. | |||
if (assetTargetFallback.RootFramework is DualCompatibilityFramework dualCompatibilityFramework) |
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 ensures the package assets are selected with dual compatibility in mind.
src/NuGet.Core/NuGet.Commands/Utility/MSBuildProjectFrameworkUtility.cs
Outdated
Show resolved
Hide resolved
86edc41
to
4b13481
Compare
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 don't feel motivated to read the test code right now, but I have some comments on the product code.
addressed your feedback @kartheekp-ms @zivkan PTAL |
cdff7da
to
89d6b55
Compare
@@ -142,7 +142,7 @@ internal static List<List<SelectionCriteria>> CreateOrderedCriteriaSets(RestoreT | |||
// Create an ordered list of selection criteria. Each will be applied, if the result is empty | |||
// fallback frameworks from "imports" will be tried. | |||
// These are only used for framework/RID combinations where content model handles everything. | |||
// AssetTargetFallback frameworks will provide multiple criteria since all assets need to be | |||
// AssetTargetFallback and DualCompatbiility frameworks will provide multiple criteria since all assets need to be |
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.
Typo, DualCompatbiility
Bug
Fixes: NuGet/Home#10194
Regression? Last working version:
Description
Design at: NuGet/Home#10299
C++/CLI .NET Core projects are projects that can install both native and managed packages.
This PR introduces a new dual compatibility framework that allows us to represent these types of projects.
I'll add some comments inline to aide the review.
PR Checklist
PR has a meaningful title
PR has a linked issue.
Described changes
Tests
Documentation