Skip to content

🚧 Parameters for project creation#179

Closed
mrlacey wants to merge 7 commits intomainfrom
i163-TemplateParameters
Closed

🚧 Parameters for project creation#179
mrlacey wants to merge 7 commits intomainfrom
i163-TemplateParameters

Conversation

@mrlacey
Copy link
Copy Markdown
Contributor

@mrlacey mrlacey commented Jun 30, 2022

For CommunityToolkit/Tooling-Windows-Submodule#65

What this does:

  • A generated experiment will now only include the "classic" version of a control template.
  • If the parameter --backed is included when calling dotnet new labexp the generated experiment will include a control that uses a style with a code-behind file, so that it's possible to use x:Bind.

This looks to be blocked by a Uno issue and so may need #174
Also, for this to be useful, it also needs #180 to be fixed.

@mrlacey
Copy link
Copy Markdown
Contributor Author

mrlacey commented Jun 30, 2022

paging @michael-hawker @Arlodotexe for comments on the above open questions.

@Arlodotexe
Copy link
Copy Markdown
Member

Should a netStandard project still be in the CommunityToolkit.Labs.WinUI namespace? (even though "WinUI" is removed from the project name.)

Probably not, especially if we aren't using WinUI there. @michael-hawker do we want to just remove the WinUI or add something to maybe match up with the dotnet toolkit.

@Arlodotexe
Copy link
Copy Markdown
Member

In the netstandard version, we'll also want to use a normal .NET 6 MSTest project, rather than the full UWP/WinAppSDK UI test projects currently used.

@michael-hawker
Copy link
Copy Markdown
Member

Discussed during our meeting, we're going to open a new issue to track a .NET Standard option, most likely as a whole separate template, but table that for now.

Matt's going to investigate the --backed option and if we can point the csproj for samples/source to the other folders with linked files so the base solution still functions. And then have that ignored by the template generatation with a <!--#if (internal) --> type guard.

@michael-hawker
Copy link
Copy Markdown
Member

Based on the error message, looks like something was missed from being excluded (e.g. looking for classical in backed).

@mrlacey
Copy link
Copy Markdown
Contributor Author

mrlacey commented Jun 30, 2022

Removing the creation of two versions of the experiments as this is only useful if also combining them into the "All" solution.
I don't believe this is appropriate as part of the CI and so will rely on manual verification of this (for now)

@michael-hawker
Copy link
Copy Markdown
Member

Yeah, next week I'll look into seeing if we can split out the workflows and use the path filtering so we only run the template/experiment job when the common/template folders have changes.

@mrlacey mrlacey changed the title 🚧 WIP: Parameters for project creation 🚧 Parameters for project creation Jun 30, 2022
@mrlacey
Copy link
Copy Markdown
Contributor Author

mrlacey commented Jun 30, 2022

Failure looks to be due to the Uno SourceGenerators not seeing the files linked from the "..*-backed" and "..*-classic" directories.

@michael-hawker
Copy link
Copy Markdown
Member

Bubbling up the error from the CI here:

"D:\a\Labs-Windows\Labs-Windows\template\lab\ProjectTemplate.sln" (default target) (1:2) ->
"D:\a\Labs-Windows\Labs-Windows\template\lab\src\CommunityToolkit.Labs.WinUI.ProjectTemplate.csproj" (default target) (2:28) ->
"D:\a\Labs-Windows\Labs-Windows\template\lab\src\CommunityToolkit.Labs.WinUI.ProjectTemplate.csproj" (Build target) (2:33) ->
(MarkupCompilePass2 target) -> 
  D:\a\Labs-Windows\Labs-Windows\template\lab\src-backed\ProjectTemplateStyle_xBind.xaml(26,12): XamlCompiler error WMC0110: Unknown target type 'labs:ProjectTemplate_xBind' [D:\a\Labs-Windows\Labs-Windows\template\lab\src\CommunityToolkit.Labs.WinUI.ProjectTemplate.csproj]
  D:\a\Labs-Windows\Labs-Windows\template\lab\src-backed\ProjectTemplateStyle_xBind.xaml(29,12): XamlCompiler error WMC0110: Unknown target type 'labs:ProjectTemplate_xBind' [D:\a\Labs-Windows\Labs-Windows\template\lab\src\CommunityToolkit.Labs.WinUI.ProjectTemplate.csproj]
  D:\a\Labs-Windows\Labs-Windows\template\lab\src-backed\ProjectTemplateStyle_xBind.xaml(62,12): XamlCompiler error WMC0110: Unknown target type 'labs:ProjectTemplate_xBind' [D:\a\Labs-Windows\Labs-Windows\template\lab\src\CommunityToolkit.Labs.WinUI.ProjectTemplate.csproj]
  D:\a\Labs-Windows\Labs-Windows\template\lab\src-backed\ProjectTemplateStyle_xBind.xaml(40,34): XamlCompiler error WMC0909: Cannot resolve DataType labs:ProjectTemplate_xBind [D:\a\Labs-Windows\Labs-Windows\template\lab\src\CommunityToolkit.Labs.WinUI.ProjectTemplate.csproj]
  ..\src-backed\ProjectTemplateStyle_xBind.xaml(41,38): XamlCompiler error WMC1111: DataTemplates containing x:Bind need a DataType to be specified using 'x:DataType' [D:\a\Labs-Windows\Labs-Windows\template\lab\src\CommunityToolkit.Labs.WinUI.ProjectTemplate.csproj]
  D:\a\Labs-Windows\Labs-Windows\template\lab\src-classic\ProjectTemplateStyle_ClassicBinding.xaml(25,12): XamlCompiler error WMC0110: Unknown target type 'labs:ProjectTemplate_ClassicBinding' [D:\a\Labs-Windows\Labs-Windows\template\lab\src\CommunityToolkit.Labs.WinUI.ProjectTemplate.csproj]
  D:\a\Labs-Windows\Labs-Windows\template\lab\src-classic\ProjectTemplateStyle_ClassicBinding.xaml(28,12): XamlCompiler error WMC0110: Unknown target type 'labs:ProjectTemplate_ClassicBinding' [D:\a\Labs-Windows\Labs-Windows\template\lab\src\CommunityToolkit.Labs.WinUI.ProjectTemplate.csproj]
  D:\a\Labs-Windows\Labs-Windows\template\lab\src-classic\ProjectTemplateStyle_ClassicBinding.xaml(55,12): XamlCompiler error WMC0110: Unknown target type 'labs:ProjectTemplate_ClassicBinding' [D:\a\Labs-Windows\Labs-Windows\template\lab\src\CommunityToolkit.Labs.WinUI.ProjectTemplate.csproj]

@Arlodotexe
Copy link
Copy Markdown
Member

Closing PR as stale. We'll use the code here an example, but the changes are so diverged by now (not even the same repo) that we'll need to redo it.

@Arlodotexe Arlodotexe closed this Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants