This is currently not possible with dotnet run .
dotnet run calls msbuild calls to restore and build, but asks for the actual program and arguments to run from a new static evaluation, which means that even if you add custom assembly logic to the solution (=> "project" "being built", you there is no way to run custom msbuild logic to extract these properties from other projects. (You can still relate the relative paths to the embedded executable, but this is very cumbersome and not very flexible)
This means that the best way would be to create scripts (.bat, .sh) that invoke the correct dotnet run -p my/project command for you, without requiring a lot of typing.
source share