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

[net7] include net6 templates #8203

Merged
merged 39 commits into from
Jul 7, 2022
Merged

Conversation

Redth
Copy link
Member

@Redth Redth commented Jun 21, 2022

Description of Change

Since you can still build a net6.0-* MAUI app with the net7 SDK, we also want to ship the net6 template packs as part of the workload.

This adds the previous dotnet sdk template pack to the manifest.

Support

Redth added 2 commits June 21, 2022 10:38
Make this the released nuget package version as defined in version.props by a new variable.
Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you dotnet new maui, how does it decide which template to use?

@Redth Redth requested a review from phenning June 21, 2022 15:04
@Redth
Copy link
Member Author

Redth commented Jun 21, 2022

If you dotnet new maui, how does it decide which template to use?

There's the new parameter for the sdk version, I think you can specify that in the CLI if you want to override the default which I believe is based on the dotnet sdk in the context you are running the command from.

@jonathanpeppers
Copy link
Member

Should we test the new switch here:

maui/eng/cake/dotnet.cake

Lines 145 to 147 in a1a9a44

foreach (var template in templates)
{
foreach (var forceDotNetBuild in new [] { true, false })

Basically test all the templates twice, once for 6 and once for 7.

@mattleibow
Copy link
Member

Yeah, we can duplicate the stage with different parameters.

@Eilon Eilon added area-setup Installation, setup, requirements, maui-check, workloads, platform support area-templates Project templates, Item Templates for Blazor and MAUI labels Jun 21, 2022
@mattleibow
Copy link
Member

This PR with make it possible to run things for net6 and net7: #8237

I finally got the quotes to work, so once that is merged, I'll update this PR.

@rmarinho
Copy link
Member

Executing: "bin/dotnet/dotnet.exe" new maui -o "D:/a/_work/_temp/templatesTest/maui_DotNet_net6.0" --framework net6.0
Error: Invalid option(s):
--framework
   '--framework' is not a valid option
net6.0
   'net6.0' is not a valid option

For more information, run:
   dotnet new maui -h

@mattleibow
Copy link
Member

According to physics, that should be there for net7. According to CI it is not.

@Redth Redth requested a review from a team as a code owner June 23, 2022 13:10
@mattleibow
Copy link
Member

For another PR later:
https://github.com/dotnet/templating/blob/main/docs/Reference-for-template.json.md#multichoice-symbols-specifics

We can do amazing things with the actual target platforms and make the csproj beautiful-er

eng/cake/dotnet.cake Outdated Show resolved Hide resolved
Comment on lines 3 to 4
<!-- Current previous .NET SDK major version's stable release of MAUI packages -->
<MicrosoftMauiPreviousDotNetReleasedVersion>6.0.500-preview.1.6049</MicrosoftMauiPreviousDotNetReleasedVersion>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be replaced with the shipping version of MAUI SR2

@mattleibow mattleibow merged commit 724e795 into net7.0 Jul 7, 2022
@mattleibow mattleibow deleted the net7-include-net6-templates branch July 7, 2022 11:54
@Redth Redth mentioned this pull request Aug 5, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-setup Installation, setup, requirements, maui-check, workloads, platform support area-templates Project templates, Item Templates for Blazor and MAUI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants