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

[workload] use **FromWorkload** for targeting/runtime pack versions #2122

Merged
merged 1 commit into from
Aug 18, 2021

Conversation

jonathanpeppers
Copy link
Member

Description of Change

Context: dotnet/sdk#19596

If we use the version number string of **FromWorkload**, then our
runtime packages don't need to be resolved from a NuGet feed. They can
be resolved from the dotnet/packs directory.

This completely eliminates the need for a NuGet.config file for
projects when you have the maui workload installed.

One caveat for dotnet/maui is we have a $(MicrosoftMauiSdkVersion).
We'll need to use **FromWorkload** in some places, and the actual
number when declaring @(PackageReference).

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)
  • Targets a single property for a single control (or intertwined few properties)
  • Adds the property to the appropriate interface
  • Avoids any changes not essential to the handler property
  • Adds the mapping to the PropertyMapper in the handler
  • Adds the mapping method to the Android, iOS, and Standard aspects of the handler
  • Implements the actual property updates (usually in extension methods in the Platform section of Core)
  • Tags ported renderer methods with [PortHandler]
  • Adds an example of the property to the sample project (MainPage)
  • Adds the property to the stub class
  • Implements basic property tests in DeviceTests

Does this PR touch anything that might affect accessibility?

No

@jonathanpeppers
Copy link
Member Author

Whoops, this needs at least .NET 6.0.100-rc.1.21412.2, and dotnet/maui has 6.0.100-rc.1.21408.2.

I'll come back to this later.

@jonathanpeppers
Copy link
Member Author

When this lands, I can come back to this: #2103

Context: dotnet/sdk#19596

If we use the version number string of `**FromWorkload**`, then our
runtime packages don't need to be resolved from a NuGet feed. They can
be resolved from the `dotnet/packs` directory.

This completely eliminates the need for a `NuGet.config` file for
projects when you have the `maui` workload installed.

One caveat for dotnet/maui is we have a `$(MicrosoftMauiSdkVersion)`.
We'll need to use `**FromWorkload**` in some places, and the actual
number when declaring `@(PackageReference)`.
@mattleibow
Copy link
Member

What is the testing process for this? If I do a dotnet new, then it will restore from nuget.org.

@jonathanpeppers
Copy link
Member Author

It looks like things have changed a little since I last looked at your CI:

- pwsh: ./build.ps1 --target=dotnet-local-workloads --configuration="${{ BuildConfiguration }}" --verbosity=diagnostic
displayName: 'Install .NET (Local Workloads)'
- pwsh: ./build.ps1 --target=dotnet-samples --configuration="${{ BuildConfiguration }}" --verbosity=diagnostic
displayName: 'Build .NET 6 Samples'

If this is still running this, it should be testing it:

$ dotnet build src/DotNet/DotNet.csproj -p:InstallWorkloadPacks=false
$ ./bin/dotnet/dotnet build src/DotNet/DotNet.csproj -t:Install
$ ./bin/dotnet/dotnet build Microsoft.Maui.Samples-net6.slnf -p:UseWorkload=true

At some point, should CI do dotnet new maui with no NuGet.config, and makes sure it can build?

@Redth Redth merged commit 9f3c7b3 into dotnet:main Aug 18, 2021
@jonathanpeppers jonathanpeppers deleted the dotnet-fromworkload branch August 18, 2021 22:32
@github-actions github-actions bot locked and limited conversation to collaborators Dec 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants