Skip to content

Conversation

@warrenbuckley
Copy link
Contributor

@warrenbuckley warrenbuckley commented Nov 14, 2025

Overview

Removes npm commands from the MSBuild of the CSPROJ of the umbraco-extension dotnet new template

Why

It was the community package team opinion that this perhaps can cause more issues than actually help users.

When using Umbraco Cloud and adding the umbraco-extension template project to an Umbraco Cloud project it would fail to build and deploy on git push due to Umbraco cloud not having node installed and we felt it odd to have explicit MSBuild properties to look for that mention Umbraco cloud in order to disable this, as not every project created with this dotnet new template may never ever get deployed to Umbraco cloud.

Another scenario discussed on the call was that you could get into a scenario where to regenerate TypeScript definitions from the website and an OpenAPI spec and run the website would fail to run if you had failing client side build.

It was generally thought that users using CI/CD would be aware to do the commands npm install and npm run build in their pipelines, if they was not directly committing the client-side build output to their codebase.

Community Package Team

This was agreed by the community package teams call on 14th November to remove this from the dotnet new template for umbraco-extension

…tension dotnet new template

Was agreed by the community package team to remove this, as this DX can cause more issues than actually help users in our opinion
Copilot AI review requested due to automatic review settings November 14, 2025 14:37
@warrenbuckley warrenbuckley changed the title Removes npm commands from the MSBuild of the CSPROJ of the umbraco-ex… Removes npm commands from MSBuild of the CSPROJ for umbraco-extension dotnet new template Nov 14, 2025
@warrenbuckley
Copy link
Contributor Author

@AndyButland & @iOvergaard hopefully this targets the correct branch for you and has the relevant information/detail in the PR for you.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes automatic NPM build integration from the umbraco-extension dotnet new template's MSBuild process. The change addresses deployment issues with platforms like Umbraco Cloud (which lack Node.js) and aligns with the expectation that developers using CI/CD pipelines will explicitly manage their npm build steps.

  • Removes two MSBuild targets (RestoreClient and BuildClient) that automatically ran npm i and npm run build
  • Shifts responsibility to developers to manually run npm commands or configure them in their CI/CD pipelines
Comments suppressed due to low confidence (1)

templates/UmbracoExtension/Umbraco.Extension.csproj:29

  • The ClientAssetsInputs ItemGroup is now unused and should be removed. It was previously referenced only in the Inputs attribute of the removed BuildClient target. Keeping unused MSBuild items can confuse developers and adds unnecessary configuration.
    <ClientAssetsInputs Include="Client\**" Exclude="$(DefaultItemExcludes)" />

@AndyButland
Copy link
Contributor

Looks good @warrenbuckley, thanks. I'm convinced!

Think Copilot has a point here doesn't it? Can this be removed too?

templates/UmbracoExtension/Umbraco.Extension.csproj:29

  • The ClientAssetsInputs ItemGroup is now unused and should be removed. It was previously referenced only in the Inputs attribute of the removed BuildClient target. Keeping unused MSBuild items can confuse developers and adds unnecessary configuration.
    <ClientAssetsInputs Include="Client\**" Exclude="$(DefaultItemExcludes)" />

@warrenbuckley
Copy link
Contributor Author

Ah good catch by Copilot - will clean it up 😄

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.

2 participants