Skip to content

Instantly share code, notes, and snippets.

@Hona
Last active October 27, 2024 23:39
Show Gist options
  • Select an option

  • Save Hona/04d66029cd4a5ff53ca245280bd9e5e3 to your computer and use it in GitHub Desktop.

Select an option

Save Hona/04d66029cd4a5ff53ca245280bd9e5e3 to your computer and use it in GitHub Desktop.
:: Script by Hona
:: Get the latest updates from the Gist below
:: https://gist.github.com/Hona/04d66029cd4a5ff53ca245280bd9e5e3
@echo off
cls
set "profile=PowerShell"
set "apiPath=.\src\WebAPI\MyApp.WebApi"
set "uiPath=.\src\WebUI\MyApp.WebUI"
wt -d "%apiPath%" --title "Web API" -p "%profile%" ; ^
new-tab -d "%uiPath%" --title "Web UI" -p "%profile%"
:: Script by Hona
:: Get the latest updates from the Gist below
:: https://gist.github.com/Hona/04d66029cd4a5ff53ca245280bd9e5e3
@echo off
cls
set "profile=PowerShell"
set "apiPath=.\src\WebAPI\MyApp.WebApi"
set "uiPath=.\src\WebUI\MyApp.WebUI"
set "delaySeconds=5"
set "dotnetStartCmd=dotnet watch --non-interactive" :: Never prompt to restart on rude edits
wt -d "%apiPath%" --title "Web API" -p "%profile%" %dotnetStartCmd% ; ^
new-tab -d "%uiPath%" --title "Web UI" -p "%profile%" pwsh -command Start-Sleep -Seconds %delaySeconds%\; %dotnetStartCmd%
@Hona

Hona commented Aug 5, 2024

Copy link
Copy Markdown
Author

If you're using Blazor, consider this link if the hot reload doesn't work in the browser

https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-watch#response-compression

@Hona

Hona commented Oct 27, 2024

Copy link
Copy Markdown
Author

Update, added a script to open terminals in the directory, without running the command yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment