Skip to content

Browser Refresh disabled because of unsupported target framework

Artak edited this page Nov 24, 2023 · 1 revision

This page is meant to give more information about the following warning, that is produced by the dotnet watch tool:

Skipping configuring browser-refresh middleware since the target framework version is not supported.

The Problem

If you have faced this issue, that is because you've tried to run dotnet watch for an application, that is targeting an unsupported TFM, and the dotnet watch tool is failing to find the matching Microsoft.AspNetCore.Watch.BrowserRefresh.dll assembly. There are, luckily, a few workarounds, that you can try.

Workarounds

Install the correct SDK

Installing the correct SDK version will bring the matching Microsoft.AspNetCore.Watch.BrowserRefresh.dll assembly, which will eliminate the discovery issue, and will result in the dotnet watch to start as before.

Use Visual Studio

Visual Studio will have a baked-in mechanism to address this issue. Customers can simply use Visual Studio instead to benefit from the Browser Refresh mechanism, even when they run projects targeting out-of-support TFM.