fix(discord): add missing Dapper.AOT reference to DiscordBot project #102

Closed
Toutsu wants to merge 0 commits from fix/discord-dapper-aot-missing into main
Owner

Summary

Discord-бот падает с FileNotFoundException: Dapper.AOT при любой работе с БД (scheduler, slash-команды). Telegram-бот работает, потому что у него прямой PackageReference на Dapper.AOT, а Discord-бота — нет.

Root Cause

GmRelay.Shared ссылается на Dapper.AOT с PrivateAssets="all", что блокирует копирование runtime DLL в downstream проекты. Discord-бот получал source-генерированный код от Shared, но не получал runtime библиотеку.

Changes

  • src/GmRelay.DiscordBot/GmRelay.DiscordBot.csproj — добавлен Dapper.AOT 1.0.48
  • tests/.../DiscordProjectStructureTests.cs — регрессионный тест, проверяющий наличие Dapper.AOT в DiscordBot csproj
  • Версия bumped → 3.0.9

Test plan

  • Локально: dotnet test --filter DiscordProjectStructureTests проходит
  • CI #???: green
  • Deploy: green
  • Проверить /newsession в Discord
## Summary Discord-бот падает с `FileNotFoundException: Dapper.AOT` при любой работе с БД (scheduler, slash-команды). Telegram-бот работает, потому что у него прямой `PackageReference` на `Dapper.AOT`, а Discord-бота — нет. ## Root Cause `GmRelay.Shared` ссылается на `Dapper.AOT` с `PrivateAssets="all"`, что блокирует копирование runtime DLL в downstream проекты. Discord-бот получал source-генерированный код от Shared, но не получал runtime библиотеку. ## Changes - `src/GmRelay.DiscordBot/GmRelay.DiscordBot.csproj` — добавлен `Dapper.AOT` 1.0.48 - `tests/.../DiscordProjectStructureTests.cs` — регрессионный тест, проверяющий наличие `Dapper.AOT` в DiscordBot csproj - Версия bumped → 3.0.9 ## Test plan - [x] Локально: `dotnet test --filter DiscordProjectStructureTests` проходит - [ ] CI #???: green - [ ] Deploy: green - [ ] Проверить `/newsession` в Discord
Toutsu added 1 commit 2026-05-26 12:21:50 +03:00
fix(discord): add missing Dapper.AOT reference to DiscordBot project
PR Checks / test-and-build (pull_request) Successful in 11m4s
dcbd9bab41
GmRelay.Shared references Dapper.AOT with PrivateAssets=all, which
prevents the runtime DLL from flowing to downstream projects. Telegram
bot works because it explicitly references Dapper.AOT directly, but
Discord bot did not — causing FileNotFoundException for Dapper.AOT
at runtime, breaking the scheduler and slash commands.

- Add Dapper.AOT 1.0.48 to GmRelay.DiscordBot.csproj
- Add regression test: DiscordWorkerProject_ShouldExist asserts
  Dapper.AOT is present in the DiscordBot csproj
- Bump version → 3.0.9

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Toutsu force-pushed fix/discord-dapper-aot-missing from 8abddd2f72 to dcbd9bab41 2026-05-26 12:21:50 +03:00 Compare
Toutsu closed this pull request 2026-05-26 16:06:29 +03:00
Some checks are pending
PR Checks / test-and-build (pull_request) Successful in 11m4s

Pull request closed

Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Toutsu/GmRelayBot#102