fix: fixed build of projects

This commit is contained in:
2025-07-10 16:00:35 +03:00
parent ace122dbbd
commit 4cc09025fe
13 changed files with 33 additions and 192 deletions

View File

@@ -10,6 +10,7 @@
<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.30.2" />
<PackageReference Include="Grpc.Net.Client" Version="2.71.0" />
<PackageReference Include="Grpc.Net.ClientFactory" Version="2.71.0" />
<PackageReference Include="Grpc.Tools" Version="2.71.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>

View File

@@ -1,5 +1,8 @@
using JOBot.TClient;
using JOBot.Proto;
using JOBot.TClient;
using JOBot.TClient.Commands;
using JOBot.TClient.Core.HostedServices;
using JOBot.TClient.Core.Services;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
@@ -11,6 +14,10 @@ var host = Host.CreateDefaultBuilder(args)
// Фоновый сервис для бота
services.AddHostedService<BotBackgroundService>();
services.AddScoped<StartCommand>();
services.AddSingleton<UserService>();
services.AddGrpcClient<User.UserClient>(o => o.Address = new Uri("http://backend:5001"));
})
.Build();