Activities of "ChetanKumbhar"

@maliming,

I tried with this, but yet issue not fixed.

Hi, In online session i can show exact project sturcture, that why i am asking online session.

@malming

can we have online session?

If i removed new IdentityDbContext( new DbContextOptionsBuilder<IdentityDbContext>().UseSqlite(connection).Options ).GetService<IRelationalDatabaseCreator>().CreateTables();

        new PermissionManagementDbContext( 
           new DbContextOptionsBuilder&lt;PermissionManagementDbContext&gt;().UseSqlite(connection).Options 
           ).GetService&lt;IRelationalDatabaseCreator&gt;().CreateTables(); 

        new SettingManagementDbContext( 
            new DbContextOptionsBuilder&lt;SettingManagementDbContext&gt;().UseSqlite(connection).Options 
            ).GetService&lt;IRelationalDatabaseCreator&gt;().CreateTables(); 

        new LanguageManagementDbContext( 
           new DbContextOptionsBuilder&lt;LanguageManagementDbContext&gt;().UseSqlite(connection).Options 
           ).GetService&lt;IRelationalDatabaseCreator&gt;().CreateTables(); 

        new SaasDbContext( 
           new DbContextOptionsBuilder&lt;SaasDbContext&gt;().UseSqlite(connection).Options 
           ).GetService&lt;IRelationalDatabaseCreator&gt;().CreateTables(); 
           

Then i am getting following error Message: Volo.Abp.AbpInitializationException : An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module **************TestBaseModule, **********.TestBase, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: SQLite Error 1: 'no such table: AbpSettings'.. See the inner exception for details. ---- Microsoft.Data.Sqlite.SqliteException : SQLite Error 1: 'no such table: AbpSettings'.

Stack Trace: ModuleManager.InitializeModules(ApplicationInitializationContext context) AbpApplicationBase.InitializeModules() AbpApplicationWithExternalServiceProvider.Initialize(IServiceProvider serviceProvider) AbpIntegratedTest1.ctor() **************TestBase1.ctor() ProfileManagementApplicationTestBase.ctor() ARNotificationApplicationServicesTests.ctor() line 29 ----- Inner Stack Trace ----- SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) SqliteCommand.PrepareAndEnumerateStatements(Stopwatch timer)+MoveNext() <44 more frames...> --- End of stack trace from previous location --- Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- TaskExtensions.WaitAndUnwrapException(Task task) AsyncContext.Run(Func1 action) AsyncHelper.RunSync(Func1 action) **************TestBaseModule.SeedTestData(ApplicationInitializationContext context) line 31 **************TestBaseModule.OnApplicationInitialization(ApplicationInitializationContext context) line 26 OnApplicationInitializationModuleLifecycleContributor.Initialize(ApplicationInitializationContext context, IAbpModule module) ModuleManager.InitializeModules(ApplicationInitializationContext context)

using Microsoft.AspNetCore.Hosting;
using Microsoft.Data.Sqlite;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.Sqlite;
using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.LanguageManagement.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.Uow;
using Volo.Saas.EntityFrameworkCore;

namespace *************.EntityFrameworkCore
{
    [DependsOn(
        typeof(*************TestBaseModule),
        typeof(*************EntityFrameworkCoreModule),
        typeof(AbpEntityFrameworkCoreSqliteModule)
        )]
    public class *************EntityFrameworkCoreTestModule : AbpModule
    {
        private SqliteConnection _sqliteConnection;
        public override void ConfigureServices(ServiceConfigurationContext context)
        {

            ConfigureInMemorySqlite(context.Services);
            context.Services.AddSingleton<IWebHostEnvironment>(new WebHostEnvironmentMockEntity());
        }

        private void ConfigureInMemorySqlite(IServiceCollection services)
        {
            _sqliteConnection = CreateDatabaseAndGetConnection();

            Configure<AbpUnitOfWorkDefaultOptions>(options =>
            {
                options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled;
            });

            services.Configure<AbpDbContextOptions>(options =>
            {
                options.Configure(context =>
                {
                    context.DbContextOptions.UseSqlite(_sqliteConnection);

                });
            });
        }

        public override void OnApplicationShutdown(ApplicationShutdownContext context)
        {
            _sqliteConnection.Dispose();
        }

        private static SqliteConnection CreateDatabaseAndGetConnection()
        {
            var connection = new SqliteConnection("Data Source=:memory:");
            connection.Open();

            new *************DbContext(
                new DbContextOptionsBuilder<*************DbContext>().UseSqlite(connection).Options
                ).GetService<IRelationalDatabaseCreator>().CreateTables();

            new IdentityDbContext(
                new DbContextOptionsBuilder<IdentityDbContext>().UseSqlite(connection).Options
                ).GetService<IRelationalDatabaseCreator>().CreateTables();

            new PermissionManagementDbContext(
               new DbContextOptionsBuilder<PermissionManagementDbContext>().UseSqlite(connection).Options
               ).GetService<IRelationalDatabaseCreator>().CreateTables();

            new SettingManagementDbContext(
                new DbContextOptionsBuilder<SettingManagementDbContext>().UseSqlite(connection).Options
                ).GetService<IRelationalDatabaseCreator>().CreateTables();

            new LanguageManagementDbContext(
               new DbContextOptionsBuilder<LanguageManagementDbContext>().UseSqlite(connection).Options
               ).GetService<IRelationalDatabaseCreator>().CreateTables();

            new SaasDbContext(
               new DbContextOptionsBuilder<SaasDbContext>().UseSqlite(connection).Options
               ).GetService<IRelationalDatabaseCreator>().CreateTables();

            return connection;
        }
    }
}

hi @EngincanV can we have online session for this?

Hi, **"The process cannot access the file .Tests\bin\Debug\net5.0\tempkey.jwk' because it is being used by another process." **

this Issue is resolved, but following issue still there.

The active test run was aborted. Reason: Test host process crashed [xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.4.3+1b45f5407b (64-bit .NET 5.0.5) [xUnit.net 00:00:01.60] Discovering: SCV.Litmus.ProfileManagement.EntityFrameworkCore.Tests [xUnit.net 00:00:01.63] Discovered: SCV.Litmus.ProfileManagement.EntityFrameworkCore.Tests [xUnit.net 00:00:01.64] Starting: SCV.Litmus.ProfileManagement.EntityFrameworkCore.Tests The active test run was aborted. Reason: Test host process crashed

Lets have a zoom call first then if requires we will work upon creating sample project,but as per our current timeline its little difficult for us to create sample project which produces our issue.

Hi,

try to connect through online session, I can not provide project. remote is very slow----should we try again?

Hi,We are still not able to figure out what is root cause of this issue. We tried all the tricks suggested by you. though we are able to stopped the creation of tempkey.jwk file but still we are getting same error as "The process cannot access the file **************.Tests\bin\Debug\net5.0\tempkey.jwk' because it is being used by another process." This is seems to be blocker for us and looks like we need to address this issue on priority so could you please schedule live session so that we can work together to identify the issue. Thanks you.

Showing 1 to 10 of 47 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11