What is your product version? 9.0.1 What is your product type (Angular or MVC)? Angular (single solution) What is product framework type (.net framework or .net core)? ASP.NET CORE
Hi what is best practise to make Migrator project work with environment jsons. I need a way to publish Migrator project to different environments each using it's own configuration.json
Thank you
4 Answer(s)
-
0
hi
You can refer to https://support.aspnetzero.com/QA/Questions/6110
-
0
Hi
The post you referred did not helped me to solve this completely. I tried to get environment from command line in Pudux.Migrator.Main() like this:
public static void Main(string[] args) { ParseArgs(args); //............. } private static void ParseArgs(string[] args) { if (args.IsNullOrEmpty()) { return; } foreach (var arg in args) { if (arg == "-s") { _skipConnVerification = true; } if (arg.ToLower() == "-staging") { _env = "Staging"; } if (arg.ToLower() == "-production") { _env = "Production"; } } }
But could not fine a way to pass
_env
to xxxMigratorModule constructure where asp.net zero is getting configuration settings. If I could pass it I can get desired configuration like this:_appConfiguration = AppConfigurations.Get( typeof(PuduxMigratorModule).GetAssembly().GetDirectoryPathOrNull(), environmentName, addUserSecrets: true );
-
0
-
0
Hi,
That was what I need thanks for helpping.