I tried using the Environment Variable APSNETCORE\_ENVIRONMENT in my csproj file as a condition. But it doesn't seem to work.

The code:

```
<Target Name="NpmInstall" Inputs="$(SpaRoot)/package.json" Outputs="$(SpaRoot)/node_modules/.install-stamp" Condition="$(ASPNETCORE_ENVIRONMENT) != 'Development'">

```