While the CLI itself doesn't have a mechanism to load response files, it calls out to MSBuild which does support both specified response files and the following automatic response files:
- MSBuild.rspnext to the project / solution file to build
- Directory.Build.rspin the hierarchy at or above the project / solution file to build
While you cannot specify CLI arguments, you can specify their equivalent MSBuild arguments.
For example you can create a release.rsp next to your solution file that specifies:
-p:Configuration=Release
-p:OutputPath=..\rel-out\
-p:PublishDir=..\pub-out\
Which you could use to call
dotnet publish test\project.csproj @release.rsp
If the same file was named Directory.Build.rsp, it would have been applied automatically.
If would also have been applied autoamatically if it was named MSbuild.rsp and put it next to the csproj file.