2

I've seen a bunch of tutorials on Youtube where they just run a ASP.NET template project, and the hot reload button shows up next to the 'Start Without Debugging' button on the top panel. I do not know why this is not happening for me, the button is just not there. I installed VS 2022 just recently (in mid-July 2022) and the project is using .NET 6. What should I do?

VS 2022 F# project toolbar

2
  • Maybe the hot reload feature is C# only? It shows up in a C# project, but not in the F# project. Commented Jul 20, 2022 at 12:18
  • I fixed this issue by opening the sln file instead of the csproj file. But I have minimal knowledge about the meaning of these files - maybe your issue is a similar config issue. You could try creating the project from scratch. Commented Oct 22, 2022 at 22:33

1 Answer 1

1

As you mentioned in the comments, F# does not support Hot Reloading according to the documentation (I am guessing you are working in an F# project by the sounds of it). Here are the unsupported scenarios:

  • Xamarin.Forms apps won’t support .NET Hot Reload in iOS and Android scenarios. You get partial support for Hot Reload when targeting a UWP app. This is by design, and we don’t expect to make any further improvements. (Note: XAML Hot Reload will continue to be available and supported for Xamarin.Forms customers on the latest SDK.)
  • .NET MAUI apps are not supported prior to Visual Studio 2022 version 17.1 Preview 1. Starting in 17.1 Preview 1, .NET MAUI is supported, but only with the debugger attached.
  • Apps built using F# or those targeting .NET Native do not support Hot Reload.

Aside from that, if you still don't see the icon, check your toolbar settings.

Sign up to request clarification or add additional context in comments.

4 Comments

Hmm, it says that it does not support .NET Native apps with F#. But is the ASP.NET project really a .NET Native one?
@MarkoGrdinić can you add a screenshot of your toolbar to your post? An ASP.NET project should really have Hot Reload available - my ASP.NET Web API project has it (it uses .NET Framework).
Done. As I said, it does not show up in the F# project, but the flame icon is there in a C# one. I am don't know if it doesn't shows up in regular F# projects, so far I've only tried an ASP.NET MVC project in VS 2022.
@MarkoGrdinić Interestingly, if I create a new F# project (console app), the hot reload is not in the toolbar. But if I add to the solution a .NET Core C# Web API project, the icon appears. But I expect it will work with the Web API project only.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.