Troubleshooting
Fixing TwinCAT HMI publish failures after a NuGet update
Short answer
The publish task fails with every symbol unresolved because TF2000, TE2000 and the HMI NuGet packages are at mixed versions after a partial TcPkg upgrade. Update all three groups together on the engineering PC and the IPC, redeploy an empty project to prove the path, then republish: the failure sits in the environment, not the project.
On this page
Align TF2000, TE2000 and the HMI NuGet packages to one release set on both the engineering PC and the IPC, then republish. This failure pattern — the publish task dies in MSBuild after a partial package upgrade, a clean empty project still deploys, and the start page loads with every symbol unresolved — is an environment version mismatch, not a broken project. The field case behind this article started it by upgrading one TcPkg package while adding a NuGet function, and the deploy path then stayed dead for about a week until the remaining HMI packages caught up. Fix the versions first; the project is the last thing to touch.
What the failed publish task tells you #
The rebuild succeeds; the failure lands in the Publish target, after the build artifacts exist. The decisive output looks like this:
Publishing extensions started
Clear current remote extensions...
C:\Program Files (x86)\Beckhoff\TwinCAT\Functions\TE2000-HMI-Engineering\MSBuild\Beckhoff.TwinCAT.HMI.targets(26,3): error : Publishing failed with error: One or more errors occurred.: One or more errors occurred.
C:\Program Files (x86)\Beckhoff\TwinCAT\Functions\TE2000-HMI-Engineering\MSBuild\Beckhoff.TwinCAT.HMI.targets(26,3): error : Publish task failed.
Done executing task "TcHmiMSBuild.Publish.v2.TcHmiPublish" -- FAILED.
Done building target "Publish" in project "Test Cell 1.hmiproj" -- FAILED.
Three facts follow from those lines:
- The project compiles, so the screens, the markup and the PLC-side code are not what broke.
- The task dies while clearing remote extensions on the server, after static content has already gone out — which is why the start page still loads afterward.
- The nested
One or more errors occurred.exposes no underlying exception. Save the complete build output: the two visible error lines cannot separate an extension problem from a package compatibility problem, and escalation needs the full log.
Decision: treat this as a publish-pipeline failure and stop editing screens and symbol bindings.
Why the empty project deploys and yours does not #
The empty project is not proof the environment is healthy; it is proof that one path works. It carries static content with no symbols and no extension dependency, so it never exercises the layer that is failing. Your project stops exactly where symbols and extensions are processed, and that difference is the diagnosis: when the canary passes and the real project dies at Clear current remote extensions..., the version-sensitive layer is symbol and extension publication.
Use the empty project as a standing canary, deployed before and after every package change. Its failure indicts the environment; its success next to a failing real project points at what only the real project contains.
The aftermath confirms the boundary. The start page serves while every symbol in the project is unresolved: a few bad bindings fail on those bindings, they do not all go dark at once. Whole-project symbol loss points at the server-side publish layer.
Align TF2000, TE2000 and the NuGet set together #
Three version groups move as one set:
- TF2000, the HMI server runtime on the IPC.
- TE2000, the HMI engineering installation on the development PC.
- The HMI NuGet packages inside the solution.
Upgrading one and leaving the others is the documented way to break publishing; this field case began with a single accidental TcPkg package upgrade. Note which direction failed on the way in: downgrade attempts through the TcPkg tooling threw errors and would not reinstall the previous release, and uninstalling every 4026.19 component on both machines plus restoring the last working source revision did not recreate the working environment. The deploy progress indicator only returned once the remaining HMI package updates completed the set.
Decision: forward-align. Update all three groups together on both machines, and drop downgrade as the recovery path — once the versions have moved, it is effectively unavailable.
Recovery sequence #
- Inventory before changing anything: the TcPkg packages, the TF2000 and TE2000 versions, and the HMI NuGet package versions in the solution, recorded for both the engineering PC and the IPC.
- Snapshot or fully back up the engineering environment. Source control restores project files, not installed components; it cannot rebuild this layer.
- Update the HMI-related components as one set — TF2000, TE2000 and every HMI NuGet package — on both machines.
- Prove the path with the canary project, published through the Visual Studio menu TwinCAT HMI / Publish to TwinCAT HMI Server or the same command on the project context menu.
- Confirm the publish configuration on the TcHmiSrv entry under Server in Solution Explorer before publishing the real project.
- If this panel is the operator's only view of the machine, put the machine in a safe state first: a half-published project leaves a start page with no live data on it. Then republish and save the complete build output.
- Verify symbols, not the start page — bound values must update. Testing HMI simulation against a live PLC is the low-risk way to confirm the bindings before the operator gets the panel back.
- Still failing after alignment: escalate to Beckhoff technical support with the full MSBuild output, the version inventory from both machines, and the project. Order the evidence the way any package-deployment diagnosis runs — versions first, connectivity facts second, complete logs third — the same order that applies when SystemLink fails to deploy packages to clients.
Rule out connectivity and validation failures first #
The alignment is the fix for one specific failure. Confirm which one you have:
| Message at publish | What it means | First action |
|---|---|---|
| Destination not reachable | The publish target cannot be contacted | Check cabling and network, ping the IPC, restart the TwinCAT HMI Server on the IPC |
| WebSocket is unreachable | Connectivity failure caught at validation | Same checks; confirm the server answers before publishing again |
| Validation errors | Publishing is blocked until validation passes | Correct the flagged entries; publish does not proceed past them |
Failure at Clear current remote extensions... with all symbols unresolved after partial updates |
Version misalignment | Forward-align the three groups as above |
The target system's firewall must also permit the port the HMI server runs on: 1010 for HTTP, 1020 for HTTPS. If the republished project loads but values go stale or drop out intermittently, you have left publish territory — work through Diagnosing intermittent HMI to PLC Ethernet comms hangs.
The snapshot arithmetic #
The field case carries the numbers for the prevention decision. The deploy path stayed dead for about 7 days after the partial update, and the HMI package that restored the deploy indicator arrived about 2 days later: 7 + 2 = 9 days of degraded environment. In hours that is 9 × 24 = 216 h; in minutes, 216 × 60 = 12,960 min.
A snapshot revert of the engineering environment is reported at about 3 minutes, so 12,960 ÷ 3 ≈ 4,320. On this incident's numbers, the missing snapshot cost roughly four thousand times the restore time. Those durations belong to one incident, not a law: the part you do not control is how fast the vendor ships the aligned package, and here that took more than a week.
Decision: snapshot the engineering environment before every TcPkg, TE2000, TF2000 or HMI NuGet change. A virtual machine with snapshot support is the practical form of that rule.
Before the next package change #
- Keep the canary project in the workspace and deploy it around every package change; its failure indicts the environment, never the project.
- Record the working version set — TcPkg, TF2000, TE2000 and each HMI NuGet package — in the project documentation, so the next recovery starts from numbers instead of memory.
- Treat the engineering environment as part of the deliverable. If this setup exists to migrate an older operator panel, fold the snapshot rule into the sequence in Planning an HMI terminal replacement from an older operator panel.
Questions asked
Does restoring the project from version control fix this?
No. Source control restores project files, not the installed engineering components, and recovery from this state is forward-only. In the field case the last working revision was restored and publishing still failed, because TF2000, TE2000 and the NuGet packages on the two machines were what had moved. Use source control for the project and a snapshot for the environment; they cover different layers.
Which versions have to match across the two machines?
The engineering PC carries TE2000 and the development-side NuGet packages; the IPC carries TF2000 and the running HMI server. The release set has to agree across both, because updating the development side and publishing to an older server produces the same mismatch with different symptoms. Record the versions from both machines together — an escalation will ask for exactly that inventory.
Could the failed publish have damaged the project file?
Unlikely. The failure happens after static content has already reached the server, which is why the start page still loads. Publish dying while clearing remote extensions, followed by every symbol resolving to nothing, describes a server-side publish layer caught between versions, not corrupted screens. Republish after alignment instead of rebuilding the project.
What belongs in the escalation to the vendor?
The complete MSBuild output rather than the last lines, the version inventory — TcPkg packages, TF2000, TE2000 and every HMI NuGet package, from both machines — and the project itself. Add a timeline: the date of the accidental upgrade and each package installed after it. The nested error text hides the underlying exception, so the full log is the only place the cause shows.
Does the engineering environment have to run in a virtual machine?
No, but a VM with snapshot support is the cheapest recovery insurance here: a revert takes minutes, while reinstalling a matched set of engineering components can take days. Any hypervisor with snapshots works. If you stay on physical hardware, take a full disk image before every package change and treat it as the snapshot equivalent.