Open Closed

Issue After Reverting from SaaS Source Code to Package Reference – ITenantAppService Not Registered #8758


User avatar
0
markusbergkvist created

Check the docs before asking a question: https://abp.io/docs/latest Check the samples to see the basic tasks: https://abp.io/docs/latest/samples The exact solution to your question may have been answered before, and please first use the search on the homepage. Provide us with the following info: 🧐 Hint: If you are using the ABP Studio, you can see all the information about your solution from the configuration window, which opens when you right-click on the solution and click on the Solution Configuration button.

  • ABP Framework version: vv8.0.3
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

We are using ABP Commercial with Blazor Server and recently attempted to switch from the NuGet-based SaaS module (Volo.Saas) to the full source code version. However, we decided to revert back to the SaaS package reference.

After completing the migration back to Volo.Saas, we ensured all csproj and Module.cs files were correctly updated, and the solution builds without errors. The only difference in the Saas packages is that we were at Abp 8.0.2 when doing the initial switch to source code, now we are at 8.0.3. However, when logging into the host page, we get the following runtime error:

[2025-02-06T09:12:22.398Z] Error: System.InvalidOperationException: Cannot provide a value for property 'TenantAppService' on type 'Volo.Saas.Host.Blazor.Pages.Shared.Components.SaasLatestTenantsWidget.SaasLatestTenantsWidgetComponent'. There is no registered service of type 'Volo.Saas.Host.ITenantAppService'. at Microsoft.AspNetCore.Components.ComponentFactory.<>c__DisplayClass9_0.<CreatePropertyInjector>g__Initialize|1(IServiceProvider serviceProvider, IComponent component) at Microsoft.AspNetCore.Components.ComponentFactory.InstantiateComponent(IServiceProvider serviceProvider, Type componentType, IComponentRenderMode callerSpecifiedRenderMode, Nullable`1 parentComponentId) at Microsoft.AspNetCore.Components.RenderTree.Renderer.InstantiateChildComponentOnFrame(RenderTreeFrame[] frames, Int32 frameIndex, Int32 parentComponentId)  
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewComponentFrame(DiffContext& diffContext, Int32 frameIndex)  
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewSubtree(DiffContext& diffContext, Int32 frameIndex)  
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex)  
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, Int32 componentId, ArrayRange`1 oldTree, ArrayRange`1 newTree) at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)  at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()  

Despite reverting to Volo.Saas, ITenantAppService is not being registered, causing an injection failure in Blazor components. Removing the widget lets us try navigate to the Editions section and there the we get this error:

System.InvalidOperationException: Cannot provide a value for property 'AppService' on type 'Volo.Saas.Host.Blazor.Pages.Saas.Host.EditionManagement'. There is no registered service of type 'Volo.Saas.Host.IEditionAppService'.

Could you clarify why ITenantAppService and IEditionAppService is not available after switching back to the SaaS package reference? Are there additional dependencies we may have missed? Do we need to manually reset or reconfigure something? Is this a known issue when reverting from source code to package reference?

Any help or guidance on how to resolve this issue would be greatly appreciated. Thanks!


2 Answer(s)
  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Is this a known issue when reverting from source code to package reference?

    Hi, no similar issue has been reported before. When you revert back to using NuGet packages, it should work as expected.

    To confirm your problem, can you answer the questions below:

    • Your *.BlazorServer project depends on the typeof(SaasHostBlazorServerModule),?
    • Your *.Application project depends on the typeof(SaasHostApplicationModule),?
    • also the other relevant module integrations have been made?
  • User Avatar
    0
    markusbergkvist created

    Hi, adding typeof(SaasHostApplicationModule) to the ApplicationModule solved the issue, we now see it probably was mistakenly deleted in the process of reverting to the nuget package. Thanks!

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 20, 2025, 18:00