AI says:
Hi! I investigated why the NuGet package installs but the Umbraco extensions are not visible in backoffice.
What is happening
The package currently builds the frontend via an MSBuild target in:
src/Umbraco.Community.CSPManager/Umbraco.Community.CSPManager.csproj
XML
<Target Name="BuildClient" BeforeTargets="AssignTargetPaths" ...>
<Exec Command="npm run build" WorkingDirectory="Client" />
</Target>
Vite outputs correctly to:
wwwroot/App_Plugins/UmbracoCommunityCSPManager/
But in the produced .nupkg, static web assets are missing entirely (confirmed by inspecting the package).
Why this causes the backoffice UI to disappear
Umbraco extension discovery depends on:
If those are not included in the NuGet package, Umbraco can’t discover/register the bundle, so the section/extensions don’t show up.
Why beta likely worked
There was a recent build-flow change (commit 8916174):
That changed when frontend assets are generated relative to pack/static-web-assets collection.
Current target hook (BeforeTargets="AssignTargetPaths") appears too late for reliable RCL static asset inclusion during dotnet pack, hence missing files in nupkg.
Suggested fix
Run client build earlier in the pipeline that feeds static web asset resolution, e.g.:
Example:
XML
<Target Name="RestoreClient"
Inputs="Client\package.json;Client\package-lock.json"
Outputs="Client\node_modules\.package-lock.json">
<Exec Command="npm ci" WorkingDirectory="Client" />
</Target>
<Target Name="BuildClient"
BeforeTargets="ResolveStaticWebAssetsInputs"
DependsOnTargets="RestoreClient"
Inputs="@(ClientAssetsInputs)"
Outputs="$(IntermediateOutputPath)client-build.stamp">
<Exec Command="npm run build" WorkingDirectory="Client" />
<Touch Files="$(IntermediateOutputPath)client-build.stamp" AlwaysCreate="true" />
</Target>
Optional safety net:
XML
<Target Name="BuildClientForPack"
BeforeTargets="GenerateNuspec"
DependsOnTargets="BuildClient" />
Extra note
This line in csproj is not the root issue, but it’s unnecessary/confusing:
XML
<None Include="Client\public\umbraco-package.json" Pack="false" />
The package should rely on the built/copied file in wwwroot/App_Plugins/..., not the source Client/public file.
How to verify after fix
After dotnet pack, inspect .nupkg and confirm it contains static web assets for:
If those are present, extensions should be discoverable again in Umbraco.