You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 15/umbraco-cms/extending/packages/creating-a-package.md
+4-28Lines changed: 4 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,6 +90,10 @@ NuGet is the standard package manager for .NET. More details on NuGet can be fou
90
90
2. Run `dotnet new install Umbraco.Templates` to install the project templates.
91
91
3. Run `dotnet new umbraco-extension -n CustomWelcomeDashboard` to create a new package project.
92
92
93
+
{% hint style="info" %}
94
+
If the post-installation script fails due to PowerShell restrictions, manually run `npm install` and `npm run build` in the `Client` folder.
95
+
{% endhint %}
96
+
93
97
This command will generate the following files:
94
98
95
99

@@ -105,34 +109,6 @@ Unlike previous versions, the `umbraco-extension` template does not generate a `
105
109
106
110
Additionally, the `.csproj` file is configured to support NuGet packaging, allowing you to distribute your extension. If you plan to include custom C# logic, the files you place in the root folder will be compiled into the package DLL.
107
111
108
-
#### Post-Installation Build Script
109
-
110
-
After creating the package project, you may be prompted to run a post-installation script:
111
-
112
-
```plaintext
113
-
Template is configured to run the following action:
114
-
Actual command: powershell cd Client;npm install;npm run build;
115
-
Do you want to run this action [Y(yes)|N(no)]?
116
-
```
117
-
118
-
Selecting Y attempts to install dependencies and build the front-end assets. However, if you encounter an error like:
119
-
120
-
```plaintext
121
-
File C:\Program Files\nodejs\npm.ps1 cannot be loaded. The file C:\Program Files\nodejs\npm.ps1 is not digitally signed.
122
-
```
123
-
124
-
This occurs due to PowerShell’s execution policy restrictions.
125
-
126
-
#### Manual Installation (Workaround)
127
-
128
-
If the script fails, navigate to the `Client` folder and manually run the following commands:
129
-
130
-
```sh
131
-
cd Client
132
-
npm install
133
-
npm run build
134
-
```
135
-
136
112
### Transfer Files
137
113
138
114
Since the `umbraco-extension` template does not generate an `App_Plugins` folder by default, you will need to manually create it.
0 commit comments