I am building the project in release mode. when I run it I want to be able to specify which environment to run against. What is the best way to achieve this?
Im not sure where the project pick up the current environment, perhaps within the AbpBootstrapper.Create method?
Guidance welcome. Ideally I will just pass an argument to the programe, environment or something like that.
Hi, I have upgraded to 8.8 and everything appears to have gone well apart from the above test now failing.
This is the message:
Message: Abp.AbpException : There is no setting defined with name: ExternalLoginProvider.Facebook Stack Trace: SettingDefinitionManager.GetSettingDefinition(String name) SettingManager.GetSettingValueInternalAsync(String name, Nullable1 tenantId, Nullable1 userId, Boolean fallbackToDefault) UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) HostSettingsAppService.GetExternalLoginProviderSettings() line 212 HostSettingsAppService.GetAllSettings() line 48 AuthorizationInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) AuditingInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) AuditingInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) ValidationInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) HostSettingsAppService_EmailSettings_Test.Should_Change_Email_Settings() line 44 --- End of stack trace from previous location where exception was thrown ---
This makes me think I might have missed something during the upgrade but I cant for the life of me find what that might be. It appears the setting provider _hostSettingsAppService.GetAllSettings()
isnt being prepared with the correct data before the test is run.
Hello,
I want my app to auo migrate any db changes on start up. This is normally pretty simple in that you just call Migrate() on the DB context.
Something like:
using (var serviceScope = app.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope()) { var context = serviceScope.ServiceProvider.GetService<T>(); context.Database.Migrate(); }
Where T is DbContext. In this case MyAppDbContext. But the service provider is unable to resolve the db context so I assume there is another way to do that?