ABP version: 5.2.0 Commercial User interface: MVC Database: EF Core Issue: Adding Forms module using ABP Suite does not create tables the database causing the following issue. In EFCore migrations files, there are no reference of the Frm tables.
I tried creating brand new project with only adding the Forms module, same effect.
2022-04-07 18:41:55.149 +02:00 [DBG] Found in the cache: pn:R,pk:admin,n:Forms.Form 2022-04-07 18:41:55.263 +02:00 [ERR] Failed executing DbCommand (10ms) [Parameters=[@__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean), @__p_0='?' (DbType = Int32), @__p_1='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] SELECT [f].[Id], [f].[CanEditResponse], [f].[ConcurrencyStamp], [f].[CreationTime], [f].[CreatorId], [f].[DeleterId], [f].[DeletionTime], [f].[Description], [f].[ExtraProperties], [f].[HasLimitOneResponsePerUser], [f].[IsAcceptingResponses], [f].[IsCollectingEmail], [f].[IsDeleted], [f].[IsQuiz], [f].[LastModificationTime], [f].[LastModifierId], [f].[RequiresLogin], [f].[TenantId], [f].[Title] FROM [FrmForms] AS [f] WHERE ((@__ef_filter__p_0 = CAST(1 AS bit)) OR ([f].[IsDeleted] = CAST(0 AS bit))) AND ((@__ef_filter__p_1 = CAST(1 AS bit)) OR [f].[TenantId] IS NULL) ORDER BY [f].[LastModificationTime] DESC OFFSET @__p_0 ROWS FETCH NEXT @__p_1 ROWS ONLY 2022-04-07 18:41:55.320 +02:00 [ERR] An exception occurred while iterating over the results of a query for context type 'Volo.Forms.EntityFrameworkCore.FormsDbContext'. Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid object name 'FrmForms'. at Microsoft.Data.SqlClient.SqlCommand.<>c.b__188_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable1.AsyncEnumerator.MoveNextAsync() ClientConnectionId:5f1a8f00-c78e-4ad2-a66b-149f08f1b49b Error Number:208,State:1,Class:16 Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid object name 'FrmForms'. at Microsoft.Data.SqlClient.SqlCommand.<>c.b__188_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable1.AsyncEnumerator.MoveNextAsync() at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable`1 source, CancellationToken cancellationToken) ClientConnectionId:5f1a8f00-c78e-4ad2-a66b-149f08f1b49b Error Number:208,State:1,Class:16 2022-04-07 18:41:55.358 +02:00 [ERR] ---------- RemoteServiceErrorInfo ----------
12 Answer(s)
-
0
Hi,
I can't reproduce the problem, can you share the full steps to reproduce it? thanks.
-
0
Hi,
My dev environment: Visual Studio 2022 Pro v17.1.3 ABP Commercial 5.2.0 (with 5.2.0 RC2, database was created but there was other issues) Local SQL Here are the steps:
- Create a new MVC solution using ABP Suite
- Open and build solution in VS
- Execute DBMigrator project
- Back in ABP SUite, add the Forms module to the solution (which is successful in ABP Suite)
- Back in VS, there is no added Migration file in EntityFramework project (I tried to run again DBMigrator project also)
- In SQL Management, there are no ABPFrm tables
- Starting the project is successful but as I click on Forms in the menu, I have "An internal error occurred during your request"
I tried several times. I tried to uninstall and reinstall ABP and ABP Suite Here is the test project: TestForm project
-
0
Hi,
I will check it, and please make the repo to private,it includes your
AbpLicenseCode
, I think you don't want to expose it. -
0
May I ask what suite version are you using?
-
0
Repo is now private, sorry.
ABB Suite 5.2.0 stable
-
0
In the CLI, I see this error: No project was found. Change the current working directory or use the --project option.
-
0
It tries to find the project in my root User folder instead of the project location
-
0
I guess that if I change the directory within ABP CLI before running ABP Suite, it is going to work
-
0
-
0
I was able to make it work with this additional steps (but I guess this is not the expected behavior):
- Create a new MVC solution using ABP Suite
- Open and build solution in VS
- Execute DBMigrator project => Shutdown ABP Suite => Change directory in ABP CLI to go to project folder => Start ABP Suite
- Back in ABP Suite, add the Forms module to the solution (which is successful in ABP Suite)
The final step (ef migration) only works if the CLI is in the project directory. This was not the case in previous versions.
-
0
Can I check it remotely? (because I can't reproduce it) shiwei.liang@volosoft.com
-
0
https://github.com/abpframework/abp/pull/12226