You can dotnet build and then dotnet run --no-build }, so that only the output of your program will be piped.
dotnet build
dotnet run --no-build }