Table of Contents

Problems Installing Apps with Hot Reload Enabled

When using Oqtane in developer mode, Hot Reload can update or restart the running application when files change.

Warning

Installing Content-Templates and Apps with Hot Reload enabled causes problems.

This is because installing the ZIP changes many files and Hot Reload can interrupt the installation.

Install Apps and Content-Templates only while Hot Reload is disabled.

Tip

After installation, you can re-enable Hot Reload.

Disable Hot Reload

  1. Stop Oqtane.

  2. Open Properties\launchSettings.json in the Oqtane server project.

  3. Set "hotReloadEnabled": false in every launch profile you use:

    "Oqtane.Server": {
      "commandName": "Project",
      "hotReloadEnabled": false
    }
    
  4. Restart Oqtane and retry the installation.

When 2sxc detects Hot Reload during an installation, it normally adds "hotReloadEnabled": false to launch profiles where the property is missing. It does not overwrite an existing value, so change an existing true to false yourself. The change only takes effect after restarting Oqtane.

If you use dotnet watch, disable Hot Reload for that run with:

dotnet watch --no-hot-reload

Alternatively, use dotnet run, which does not enable Hot Reload.

dotnet run -p:hotreloadenable=false

Checklist to Disable Hot Reload Temporarily

Background: Hot-Reload Detection

2sxc detects active Hot Reload when the environment variable DOTNET_MODIFIABLE_ASSEMBLIES is set to debug. Visual Studio and dotnet watch set this when the runtime accepts Hot Reload changes.

The check no longer uses Microsoft.AspNetCore.Watch.BrowserRefresh.dll, because that assembly can also be loaded when only browser refresh is active and Hot Reload is disabled.

If you believe the detection is incorrect, please open an issue on GitHub.

Next Step

  • To avoid potential build errors, exclude the 2sxc and Content folders from Oqtane.Server.csproj. See Build Oqtane Server Issue.

Shortlink to here: https://go.2sxc.org/oqt-hr