[build-tools] fix InstallMaui target for .NET 7#7173
Merged
jonathanpeppers merged 1 commit intodotnet:mainfrom Jul 15, 2022
Merged
[build-tools] fix InstallMaui target for .NET 7#7173jonathanpeppers merged 1 commit intodotnet:mainfrom
jonathanpeppers merged 1 commit intodotnet:mainfrom
Conversation
This addresses several problems with the `InstallMaui` target:
1. There was not a way to override `$(MauiVersionBand)`. You can now
pass this value in such as `-p:MauiVersionBand=7.0.100`.
2. 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 will
work by default when this lands:
dotnet/maui#8737
Until dotnet/maui#8737 is merged, `-p:MauiVersionBand=7.0.100` can be
used.
3. The `dotnet6` feed is now required:
Workload installation failed: microsoft.maui.sdk::6.0.408 is not found in NuGet feeds https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json;https://pkgs.dev.azure.com/xamarin/public/_packaging/Xamarin.Android/nuget/v3/index.json".
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. I
added logic to parse the `NuGet.config` file and add an extra source
for the `dotnet6` feed. This should be the most reliable method going
forward.
pjcollins
approved these changes
Jul 14, 2022
dellis1972
approved these changes
Jul 14, 2022
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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.
This addresses several problems with the
InstallMauitarget: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.100can beused.
dotnet6feed 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.configfile and add an extra sourcefor the
dotnet6feed. This should be the most reliable method goingforward.