Last active
September 5, 2021 02:54
-
-
Save brianmed/17202c2be99585ab138a41334207d027 to your computer and use it in GitHub Desktop.
ASP.Net MVC Core 5 Remote Run with Local File Editing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# PATH=$PATH:. DOTNET_WATCH_SUPPRESS_MSBUILD_INCREMENTALISM=1 DOTNET_WATCH_SUPPRESS_LAUNCH_BROWSER=1 DOTNET_WATCH_SUPPRESS_BROWSER_REFRESH=1 DOTNET_USE_POLLING_FILE_WATCHER=1 dotnet watch --verbose remoteRun | |
set -e | |
# Because the text goes crazy when the watcher detects a change | |
stty sane | |
# publish so we get wwwroot | |
dotnet publish -r linux-x64 --configuration Debug | |
# File magic | |
rsync -azPv --stats --progress --delete-after bin/Debug/net5.0/linux-x64/publish/ [email protected]:AppName/ | |
# For context | |
date | |
# Command Magic | |
ssh -t [email protected] sh -c \'cd AppName \&\& ASPNETCORE_ENVIRONMENT=Development dotnet ./AppName.Server.dll --urls="http://*:5000"\' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment