adospace / reactorui-maui

MauiReactor is a MVU UI framework built on top of .NET MAUI
MIT License
586 stars 49 forks source link

Start hot reload after project run #83

Closed MattePozzy closed 1 year ago

MattePozzy commented 1 year ago

Hi, how its possible to run the command to start the hot reload just after the project is built? I need to run this command dotnet-maui-reactor -f [net7.0-android|net7.0-ios|net7.0-maccatalyst|windows10.0.19041.0] --mode Full when a specific platform is selected to build and run.

Thank you.

adospace commented 1 year ago

Well, I'm not sure you need to run it just after the project build, I guess you need to run the hot reload when the project runs? I have a custom command in visual studio (using a custom context menu on the project) that runs the command on the project folder, or I'm missing anything?

MattePozzy commented 1 year ago

Well, I'm not sure you need to run it just after the project build, I guess you need to run the hot reload when the project runs? I have a custom command in visual studio (using a custom context menu on the project) that runs the command on the project folder, or I'm missing anything?

Yes, sorry, I need to do the same thing. Could you please tell me how can I do this?

Thank you!

adospace commented 1 year ago

In Visual Studio create an external tool from Tools->External Tools like this:

Visual Studio external tools dialog image

Add the command to the Solution context menu. Right-click on the toolbar and select Customize button:

Add a new command and select the correct External Command (in my case was External Command 2):

image

MattePozzy commented 1 year ago

In Visual Studio create an external tool from Tools->External Tools like this:

Visual Studio external tools dialog image

Add the command to the Solution context menu. Right-click on the toolbar and select Customize button:

Add a new command and select the correct External Command (in my case was External Command 2):

image

Thank you!

Code-DJ commented 1 year ago

@adospace you call the External Tools item "Run MauiReactor Hot-Reload (Android)" but that command is to build and run. For hot-reload, don't you also need to run dotnet-maui-reactor -f net7.0-android separately?

PS: I do dev on VSCode on macOS + iOS. So run two commands in two separate terminals:

dotnet build -t:Run -f net7.0-ios /p:_DeviceName=:v2:udid=***
dotnet-maui-reactor -f net7.0-ios
adospace commented 1 year ago

Yes, of course, you're right, this the correct command:

/c "wt.exe dotnet-maui-reactor -f net7.0-android -d $(ProjectDir)"

image