MSBuildSdkExtras
MSBuildSdkExtras copied to clipboard
Workflow Foundation: XamlAppDef
I'm trying to do a similar thing for Workflow Foundation XAML Activities.
A typical activity item is added to a csproj as follow:
<ItemGroup>
<XamlAppDef Include="Activity1.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</XamlAppDef>
</ItemGroup>
What would be required to make this work, similar to WPF XAML?
In my list of things to support for my own projects, see #56 (i.e. complete build and project support for .NETFramework based projects)
The trick here, is around the implicit includes and what they should be. WPF, UWP, Workflow, and XamForms, all use the XAML file extension and need to be included in different ways.
Question is how to tell them apart in a meaningful way.
I wonder if it'd be enough if the project had something like:
<XamlAppDef Include="Activity1.xaml" />
or a glob <XamlAppDef Include="myactivities/*.xaml" />
in your project file. In that scenario, it's easy to add the additional metadata (Generator and Compile).
Any thoughts?
I did something like this:
At least for .NET Framework, I used a FrameworkProjectType
property
Still what if a project has a mix of WF, WPF, WWF, ASP.NET, etc... I had one project like that before I split that up but this seems a perfect excuse to cook that up again.
I was also thinking up of rules like *Page*
, *Activity*
, *Flow*
, *App*
, *Window*
, *Form*
, *Dialog*
, etc... just like #47 to include TFMs either as a parent folder or part of a filename.