I investigated this a bit, but actually did not get any good result.
There are some project variables that appear in scripts. Unfortunately, they are very limited :
%project:Name% gives the project name%project:Directory% provides the project directory%project:Version% gives you the project version
Thus, there is no way to access the assembly configuration or environment.
The configurations option in project.json also limited to building configurations and only allows the declaration of compilation options, and therefore also does not work.
Unfortunately, there is also no other way to solve this problem. At least for now. I would think that I am sending a DNX porting request to add some additional project variables that could be used, but at the moment it makes no sense to invest time in DNX: after everything has been replaced with CLET dotnet. Well, let's see if this has a functionality function for accessing the environment, and if not, I can send a transfer request to add this functionality. But until we get there, I'm afraid there is no solution for this.
source share