0

I know how to do this with batch files, you add the path to the system variable but I cannot seem to find the answer to my question anywhere. Anyone knows?

example: Instead of navigating to the app directory and running dotnet run I would like to just call a command like myApp from any directory I'm in.

PS: Im using windows 10.

2 Answers2

1

you can just use a shell alias if you work on cmd

doskey runMyApp=dotnet run path\to\my\app

more info given here

mlindner
  • 11
  • 2
0

First, you need to know which folders are in your path environment variable. You can see those if you go to ControlPanel/System/Advanced settings/Environment Variables

So, you either use one of the existing folders, or you add a new folder.

After that, you can can compile your dotnet core program to a .exe file. See this answer for details on how to do that.

AdrAs
  • 676
  • 3
  • 14