pnp / pnp/pnpframework

Referencing an external template with ProvisioningTemplateFile is not working

Open
#436 0 comments 0 reactions 1 assignee View on GitHub

@pkbullock is already working on this.

Since Jul 19, 2023.

area: powershell 🐱‍👤 help wanted question
Dominant language
C#
Stars
259
Forks
161
Avg merge
10h 33m
Merged PRs (30d)
1

Description

We are trying to modularize our PnP Provisioning templates by using ProvisioningTemplateFile references:

<?xml version="1.0"?>
<pnp:Provisioning xmlns:pnp="http://schemas.dev.office.com/PnP/2021/03/ProvisioningSchema">
  <pnp:Preferences Generator="PnP.Framework, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null" />
  <pnp:Templates ID="CockpitSiteTemplate">
    <pnp:ProvisioningTemplateFile ID="CockpitTermGroups" File="cockpit_termGroups.xml" />
    <pnp:ProvisioningTemplateFile ID="CockpitSiteColumns" File="cockpit_siteFields.xml" />
    <pnp:ProvisioningTemplateFile ID="CockpitContentTypes" File="cockpit_contentTypes.xml" />
    <pnp:ProvisioningTemplateFile ID="CockpitSiteRequests" File="cockpit_list_siteRequests.xml" />
  </pnp:Templates>
</pnp:Provisioning>

Nothing happens when we apply the template via Invoke-PnPSiteTemplate. The engine is intialized and immediately quits we no error. As if the template was empty.

I already know about the possibilities to use xi:include but I would prefer ProvisioningTemplateFile to avoid manually changing the referenced templates.

Is ProvisioningTemplateFile supposed to work? Any working examples?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.