SMAPI icon indicating copy to clipboard operation
SMAPI copied to clipboard

Support hot reload please

Open Lixeer opened this issue 2 months ago • 4 comments

As a mod developer, when I create and build my mod, I use dotnet build and dotnet run. However, even after making a small change to the code, I have to shut down the game, run dotnet build or dotnet run again. This process is very time-consuming.

Hot reload functionality is essential in many game modloader (such as Forge or tModLoader). I would like to suggest adding this feature to your development roadmap. If you are already planning to support it, I would be happy to contribute via a pull request.

Lixeer avatar Oct 14 '25 04:10 Lixeer

I use hot reload all the time, but I normally use windows - not sure what you’re using. I als tend to use visual studio.

When using my Mac laptop and Rider, I’ve noticed in the past that I usually can only get the debugger or hot reload working, not both. But usually I used hot reload via dotnet run I think, so I wonder why it isn’t working for you at all.

spacechase0 avatar Oct 14 '25 11:10 spacechase0

I use vscode to develop my mod, I usually input dotnet run to console,then the SMAPI will runing. For this way, I can not hot reload my code.

Lixeer avatar Oct 14 '25 12:10 Lixeer

Hot reload is already fully supported with Visual Studio. If VS Code needs special changes to support it, pull requests are welcome!

Pathoschild avatar Oct 16 '25 01:10 Pathoschild

In theory, we can use dotnet watch to develop a csharp program with hot reload support. But when I developed the mod by SMAPI, it look like unwork.

Lixeer avatar Oct 19 '25 14:10 Lixeer