Repository navigation
Add properties to disable implicit things - #17046
Merged
Merged
Conversation
Member
Author
|
This will not work amazingly because of AndroidX and the constant type renames and moves: #12953 (comment) However, if we can keep the net7.0 branch updated then maybe... |
jonathanpeppers
approved these changes
Aug 29, 2023
jonathanpeppers
left a comment
Member
There was a problem hiding this comment.
This looks good. 👍
How will this change get to the main branch?
Member
Author
|
It won't because main/net8 does not use these frameworks and nugets |
Member
Author
|
/backport to release/7.0.2xx-sr8 |
Contributor
|
Started backporting to release/7.0.2xx-sr8: https://github.com/dotnet/maui/actions/runs/6014603287 |
jonathanpeppers
added a commit
to jonathanpeppers/maui
that referenced
this pull request
Sep 6, 2023
Context: https://learn.microsoft.com/nuget/consume-packages/Central-Package-Management Fixes: dotnet#12953 @mattleibow has already made a few changes to improve this scenario, by introducing `$(DisableMauiImplicitPackageReferences)`. I think the main thing missing is to change default values when `$(ManagePackageVersionsCentrally)` is true. This setting, that enables CPM, should automatically turn off all implicit `@(PackageReference)`. I renamed `$(EnableMauiImplicitPackageReferences)` to `$(DisableMauiImplicitPackageReferences)` to better align with the changes we made in MAUI in .NET 7 for a future servicing release: dotnet#17046 I tested these changes in a sample application here: jdebache/repros@master...jonathanpeppers:MauiNuGetCPMRepro:peppers I also updated `Workload/README.md` to have a section showing how to setup NuGet CPM.
rmarinho
pushed a commit
that referenced
this pull request
Sep 7, 2023
Context: https://learn.microsoft.com/nuget/consume-packages/Central-Package-Management Fixes: #12953 @mattleibow has already made a few changes to improve this scenario, by introducing `$(DisableMauiImplicitPackageReferences)`. I think the main thing missing is to change default values when `$(ManagePackageVersionsCentrally)` is true. This setting, that enables CPM, should automatically turn off all implicit `@(PackageReference)`. I renamed `$(EnableMauiImplicitPackageReferences)` to `$(DisableMauiImplicitPackageReferences)` to better align with the changes we made in MAUI in .NET 7 for a future servicing release: #17046 I tested these changes in a sample application here: jdebache/repros@master...jonathanpeppers:MauiNuGetCPMRepro:peppers I also updated `Workload/README.md` to have a section showing how to setup NuGet CPM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
Add two properties to allow disabling of things for various reasons:
DisableMauiImplicitPackageReferenceswill allow users to disable the package references and allow for updates (where possible)DisableMauiImplicitFrameworkReferenceswill disable the implicitFrameworkReferenceitems so potentially allowing for Essentials to be updated via NuGetIf you set these properties in your csproj, you will now have full control over the things that are added, so you will still need to do very similar versions. See more info in the issue.
But you can do something like this: