Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "SEB_ADMIN"

I tried this but it is still complaining on dependency injection for CalculatorProfileJob. it is a domain service under "core" Project and it has dependencies injected into it ( like repositories). Looks like I have to inject the entire dependency hiearchy chain here which is not correct. Is there a way out ?.

You can try this just by creating a new .NET Core Worker service project and injecting any of Abp domain services into it

I guess the bootstrapper is still not taking care of dependency injection for the HostedService.

Hi The bootstrapper works fine for the Console Application. But here I am using a .NET Core Worker Service to be deployed as Windows Service . it uses "DefaultHostBuilder". The key here is how do I define a startup module and hook it into the Host builder. There seem to be no direct way of doing it. How do I inject abp IOC Container and dependencies into my Host Builder ? I can use services.AddSingleton() as in the example below, but I cannot add entire dependency chain individually in this fashion. The only way to add all dependencies through chain of execution of Modules for each assembly which will all be made dependent on my start up module.

Just like a Console Application example, Dont you have an example of Windows Service or Worker Service accessing all Abp's Application, Domain and Entityframework layer components ?. That would be useful..

My key problem is "How do I attach a Startup module to my Worker Service Host Builder". If I am able to do that I can hook dependencies to other Modules ( application, Core etc.) and get all the components into IOC container automatically.

How do I inject the entire dependency container of Abp in the code below ??

Host.CreateDefaultBuilder(args) .UseWindowsService()

            .ConfigureServices((hostContext, services) =>
            {
                
                services.AddHostedService<CalculatorScheduler>();
                services.AddSingleton<ICalculatorProfileJob, CalculatorProfileJob>();
                                     
            });

Hi- Thanks for the information. I was able to get it working for a Console Application.

 But I need to hookup a startup module to my   .NET Core Worker service I am creating ( Windows Service ).
 
 How do I hook up a start up module to my worker service using a default host builder. For e.g below
 

** it seems the extension method "AddAbp" is not available for a default Host Builder.**

 "CalculatorSchedulerModule" is my custom start up module for my custom worker service and I have set the 
 dependency of that module to Core Module and Entity framework module.
 
 I noticed that the extension method is part of namespace "Abp.AspNetCore".  How do I reference that in my custom
 worker service which I am planning to run as a  Windows Service.
 
 The below code is in "Program.cs".
 
    Host.CreateDefaultBuilder(args)
            .UseWindowsService()
         
            .ConfigureServices((hostContext, services) =>
            {
                services.AddHostedService<CalculatorScheduler>();
             **   services.AddAbp<CalculatorSchedulerModule>();**
                                  
            });

Hi- I added the sqllite version 3.1.1 and it worked fine in my local visual studio 2019.. The problem is specific to Azure Build/Deploy.

I am using VS 2019 and azure is also set up to use Agent windows-2019 and VS 2019 to build the web solution but is giving following error. Why is the web solution targeted for .netcoreapp3.1 needs "Microsoft.Build.Framework version 15.1.0.0" as below..

Have you tested your latest solution v8.4 with Azure pipeline using VS 2019 ? or do you have instructions for setting up azure pipeline for ZERO solution V 8.4

##[error]The nuget command failed with exit code(1) and error(Error parsing solution file at D:\a\10\s\TEST\aspnet-core\SEB.FPE.Web.sln: Exception has been thrown by the target of an invocation. The project file could not be loaded. Could not load file or assembly 'Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. D:\a\10\s\TEST\aspnet-core\SEB.FPE.Web.sln)

Hi- I am using the solution version 8.4 AS IS without any additions. I see the sqlite dll reference in the web.host proj release/bin folder. Where is it coming from ?. Is any of your abp libraries internally referrring to this ? . please see screenshot below

Showing 11 to 15 of 15 entries