当我发布项目时
dotnet publish
它输出到一个文件夹
bin/Debug/dnxcore50/osx.10.11-x64/publish
(或等效于Release)

是否可以为project.json文件中指定的发布后脚本确定此文件夹位置?

最佳答案

得益于dotnet/cli gitter channel 上的快速响应,您可以。以下变量可用:

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

Source

以下是用于预编译/后编译的代码:
%compile:TargetFramework%
%compile:FullTargetFramework%
%compile:Configuration%
%compile:OutputFile%
%compile:OutputDir%
%compile:ResponseFile%
%compile:RuntimeOutputDir%
%compile:RuntimeIdentifier%
%compile:CompilerExitCode%     // postcompile only

Source

关于dnx - 如何确定dnu/dotnet发布的输出文件夹,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/36730901/

10-12 20:12