How to determine dnu / dotnet publish output folder

When I publish my project using

dotnet publish

displayed in the folder

bin/Debug/dnxcore50/osx.10.11-x64/publish

(or possibly the equivalent of Release)

Is it possible to determine the location of this folder for the postpublish script specified in the project.json file?

+5
source share
1 answer

Thanks to the quick response to the dotnet / cli gitter channel you can. The following variables are available:

 %publish:ProjectPath% %publish:Configuration% %publish:OutputPath% %publish:TargetFramework% %publish:FullTargetFramework% %publish:Runtime% 

A source

And so for pre / postcompile:

 %compile:TargetFramework% %compile:FullTargetFramework% %compile:Configuration% %compile:OutputFile% %compile:OutputDir% %compile:ResponseFile% %compile:RuntimeOutputDir% %compile:RuntimeIdentifier% %compile:CompilerExitCode% // postcompile only 

A source

+11
source

Source: https://habr.com/ru/post/1247478/


All Articles