Hi,
We're using Angular 7 and TypeScript and found that VS Code is a really fast way to get up and running. Typescript debugging worked immediatly and the editor is really fast. We've decided to continue to run Visual Studio for debugging the backend and use VS Code to launch and debug the front end.
The problem were having is. How to intergrate with the appsettings.{variable}.json and appconfig.{variable}.json? This works perfectly in Visual Studio but but VS Code see's them as seperate files.
If we have a single file for appsettings.json and appconfig.json everything works. But then each develeloper must update everything everytime you update from source control. As usual, you forget something and spend 10 min tracking it down.
So today we attempted to use angular.json > configurations > fileReplacments but we cant get it working, and even it it was to work, it would never support the inheritance of properys between the appsettings.json and the appsettings.{variable}.json.
Anyone have any suggestions??
Thanks
3 Answer(s)
-
0
ng build --env=prod
thenenvironment.prod.ts
will be used instead.For the .net core application, you can set it in
launch.json
"env": { "ASPNETCORE_ENVIRONMENT": "Development" }
-
0
for my version of angular CLI the --env is not valid but you can use --configuration.
Also will setting ASPNETCORE_ENVIRONMENT change the use of appsettings.json ??
-
0
Also will setting ASPNETCORE_ENVIRONMENT change the use of appsettings.json ??
@commondesk , Yes.