-
ABP Framework version: v4.4.4
-
UI type: Blazor
-
DB provider: EF Core
-
Tiered (MVC) or Identity Server Separated (Angular): yes
-
Exception message and stack trace:
HI guys
I creat a microserve with abp suite,then add the services\product in it.when i creat a crud page I get error "can't find the Volo.Abp.Commercial.SuiteTemplates.dll",
the dll doesn't exist in "bin\Debug\net5.0" like this url support.so I use " abp add-package Volo.Abp.Commercial.SuiteTemplates" to add the SuiteTemplates to my product.blazor project.
then i get the curd page created.but when I try to build the project,I get lots of errors. one kind is "The name 'xxx' does not exist in the current context" like the L method,
other one is "'OnInitializedAsync' : no suitable method found to override".
the razor page has this line" @inherits ProductServiceComponentBase". I don't know how to fix and what i missed.
I have few questiones.
Q1 Is the microserve project need to add the "SuiteTemplates.dll" manualy?
Q2 Why the errors("cs0115,cs0103") came.how should i fix ?
PS:I am dealing the problem few days.i tried to uninstall cli and the abp suite. created a new project,but noting worked. please help me out.
19 Answer(s)
-
0
Hi,
Unfortunately,
product service
does not support code generation withSuite
in versions4.*.*
. This is valid even if you addSuiteTemplates.dll
manually. Please wait for5.0.0-rc.1
to come out or try it in version5.0.0.beta.*
. -
0
Hi @mc86, as @berkansasmaz mentioned
product service
does not support code generation with Suite in versions4.*.*
. But you can create a new microservice and then generate CRUD pages for it. -
0
I fllowed @EngincanV's suggestion ,use "abp new OA -t microservice-service-pro" then "dotnet build" but still get "The name 'xxx' does not exist in the current" and "'OnInitializedAsync' : no suitable method found to override" in my CRUD page
-
0
Hi @mc86, after creating the new microservice did you follow the documentation?
After applyng the steps in the documentation you should be able to generate CRUD pages for your microservice.
-
0
HI @EngincanV.
Thanks for reply
I have done those steps
1.use “abp new OrderService -t microservice-service-pro”
2.use "abp add-package Volo.Abp.Commercial.SuiteTemplates" in my blazor project.
(if i don't use this i will get can't find Commercial.SuiteTemplates.dll error when generating
)
3. Copy SuiteTemplates.dll to my blazor project
4.Use suite generated a test page named "Mail".I can get my CRUD generated,but the page has a lot of errors.
-
0
Hi @mc86, I will check and write you back asap.
-
0
Did you build your new service using
dotnet build /graphbuild
? -
0
Hi @mc86, I've tried just before. I could successfully generate CRUD pages and not encounter with any dependency resolution problem. But as @gterdem mentioned, i use the
dotnet build /graphBuild
command in my root directory to ensure the solution is completely built.Can you first execute the
delete-bin-obj-folders.bat
file to delete all bin/obj folders that generated before and then run thedotnet build /graphBuild
on your root directory?up to 5.0 rc1 also didn't work.as the same as4.4.4
ABP Commercial 5.0.0-rc.1 release has just been completed, so when you updated to
5.0.0-rc.1
it probably still used the v4.4.4 or it should have given some errors.2.use "abp add-package Volo.Abp.Commercial.SuiteTemplates" in my blazor project.
(if i don't use this i will get can't find Commercial.SuiteTemplates.dll error when generatingI've encountered this problem with MVC page generation, it really sometimes happen but after adding this .dll file into the relevant project directory, I could generate CRUD pages for MVC UI as well.
-
0
HI @EngincanV did your try blazor ui?
I capture my opreating screen in mp4,may I send to you? -
0
HI @EngincanV did your try blazor ui?
I capture my opreating screen in mp4,may I send to you?Yes, I've tried Blazor UI and I could successfully generate CRUD pages.
You can send the video to engin.veske@volosoft.com.
-
0
@EngincanV I have send my video to you.
-
0
@mc86 I got your mail, I will watch the video and write you back asap.
-
1
Can you share the video of the problem or a public platform and sharing link here so other people can also benefit from the solution of this problem?
-
0
HI @gterdem
I put my video in https://drive.google.com/file/d/1gzh5A5JUfO9mj8Ts8FKEw6CVRN0YoQmd/view?usp=sharing.
for convenient you can share the video to other platform which you want. -
0
Hi @mc86, I watched your video and I noticed your ABP Suite and ABP project versions are different. (Suite runs in v5.0.0-rc.1 and your project created in v4.4.4)
( A screenshot from your video, 4:05) It used the cached template. (v4.4.4)
Please apply these steps:
1-) Ensure you've upgraded both CLI and Suite versions to 5.0.0-rc.1.
dotnet tool update Volo.Abp.Cli -g --version 5.0.0-rc.1 dotnet tool update Volo.Abp.Suite -g --version 5.0.0-rc.1
2-) Delete the microservice-pro template for v5.0.0-rc.1, if you've created yesterday. (Because we've updated ms-pro template for Blazor UI yesterday.)
(Delete this zip file:
%UserProfile%\.abp\templates\microservice-pro-5.0.0-rc.1.zip
)3-) Create a microservice template via CLI or Suite.
CLI:
abp new <solution name> -t microservice-pro -u blazor --preview
Suite:
Don't forget to select "Preview" checbox.
4-) Then click the "Add an existing solution" button on homepage of Suite, and fill the input with your product-service path.
5-) Then click "Ok" button, and generate CRUD pages for an entity.
6-) Finally, click the "Save and generate" button and generate CRUD pages for your product-service.
After you've generated CRUD pages for your product-service, you will get the following error on your Blazor UI.
We've created internal issues for these problems and they will be fixed in the next release.
error CS0115: 'Books.OnInitializedAsync()': no suitable method found to override
For fix this problem, open your new generated file (Book.razor.cs in our case) change the namespace of the generated file.
Namespace should be
MySptDemoForBz5001.ProductService.Blazor.Pages.ProductService
(add the folder name to end of the current namespace)-
Then change the
CreateBookAsync
andUpdateAsync
methods like in the image below.
-
-
0
HI @EngincanV
about " I watched your video and I noticed your ABP Suite and ABP project versions are different. (Suite runs in v5.0.0-rc.1 and your project created in v4.4.4)"
I noticed the error then when i was opreating. I delete the OA folder soon, after few second(4:30) later I create the project again use v 5.0.0 -rc1
.
I will try with your instruction.
-
0
I will try your instruction.
After following the steps, you can close the question if it works, if you still got problem please don't hesitate to write back.
-
0
HI @EngincanV
I think the namespace problem is the man reason that caused the errors.
It is fine for now.
Thanks for your guy's work.