[build-tools] fix InstallMaui target for .NET 7 #7173
Merged
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.
This addresses several problems with the
InstallMaui
target:There was not a way to override
$(MauiVersionBand)
. You can nowpass this value in such as
-p:MauiVersionBand=7.0.100
.The logic for computing
$(MauiVersionBand)
was wrong:error NU1101: Unable to find package Microsoft.NET.Sdk.Maui.Manifest-7.0.000.
This should default to
$(DotNetSdkManifestsFolder)
now, which willwork by default when this lands: dotnet/maui#8737
Until dotnet/maui#8737 is merged,
-p:MauiVersionBand=7.0.100
can beused.
dotnet6
feed is now required:This is a .NET 6 package on NuGet.org, but not in dotnet-public. It is
necessary when building
net6.0-*
MAUI projects with a .NET 7 SDK. Iadded logic to parse the
NuGet.config
file and add an extra sourcefor the
dotnet6
feed. This should be the most reliable method goingforward.