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
|[ELECTRON004](#3-electron-builderjson-location)| electron-builder.json wrong location | Warns if electron-builder.json is found in incorrect locations |
15
15
|[ELECTRON005](#4-parent-paths-not-allowed-in-electron-builderjson)| Parent paths not allowed | Checks for `..` references in config |
|[ELECTRON006](#5-publish-profile-validation)| ASP.NET publish profile mismatch | Warns when ASP.NET projects have console-style profiles |
17
+
|[ELECTRON007](#5-publish-profile-validation)| Console publish profile mismatch | Warns when console projects have ASP.NET-style profiles |
17
18
18
19
---
19
20
@@ -178,15 +179,26 @@ During the publish process, the `electron-builder.json` file is copied to the bu
178
179
179
180
## 5. Publish Profile Validation
180
181
181
-
**Warning Code:**`ELECTRON006`
182
+
**Warning Codes:**`ELECTRON006`, `ELECTRON007`
182
183
183
184
### What is checked
184
185
185
-
The build system examines `.pubxml` files in the `Properties/PublishProfiles` folder and checks for `WebPublishMethod` and `ProjectGuid` properties, which indicate ASP.NET-style publish profiles.
186
+
The build system examines `.pubxml` files in the `Properties/PublishProfiles` folder and validates that they match the project type:
187
+
188
+
-**ELECTRON006**: For **ASP.NET projects** (using `Microsoft.NET.Sdk.Web`), checks that publish profiles include `WebPublishMethod`. This property is required for proper ASP.NET publishing.
189
+
190
+
-**ELECTRON007**: For **console/other projects** (not using the Web SDK), checks that publish profiles do NOT include the `WebPublishMethod` property. These ASP.NET-specific properties are incorrect for non-web applications.
186
191
187
192
### Why this matters
188
193
189
-
Electron.NET uses a special publish process that packages your application with Electron. Standard ASP.NET publish profiles may not work correctly and can lead to incomplete or broken builds.
194
+
Electron.NET supports both ASP.NET and console application project types, each requiring different publish profile configurations:
195
+
196
+
| Project Type | SDK | Expected Properties |
197
+
|--------------|-----|---------------------|
198
+
| ASP.NET (Razor Pages, MVC, Blazor) |`Microsoft.NET.Sdk.Web`|`WebPublishMethod`, no `PublishProtocol`|
199
+
| Console Application |`Microsoft.NET.Sdk`|`PublishProtocol`, no `WebPublishMethod`|
200
+
201
+
Using the wrong publish profile type can lead to incomplete or broken builds.
190
202
191
203
### How to fix
192
204
@@ -196,19 +208,7 @@ Electron.NET uses a special publish process that packages your application with
196
208
- Select **Publish...**
197
209
- Follow the wizard to create a **Folder** publish profile
198
210
199
-
**Correct publish profile example:**
200
-
```xml
201
-
<?xml version="1.0" encoding="utf-8"?>
202
-
<Project>
203
-
<PropertyGroup>
204
-
<PublishUrl>publish\</PublishUrl>
205
-
<PublishDir>publish\</PublishDir>
206
-
<SelfContained>true</SelfContained>
207
-
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
208
-
<PublishSingleFile>false</PublishSingleFile>
209
-
</PropertyGroup>
210
-
</Project>
211
-
```
211
+
For correct publish profile examples for both ASP.NET and Console applications, see **[Package Building](../Using/Package-Building.md#step-1-create-publish-profiles)**.
0 commit comments