2026-07-23 18:46:12 [DBG] 1 recurring job(s) processed by scheduler. 2026-07-23 18:46:17 [DBG] Executing HealthCheck collector HostedService. 2026-07-23 18:46:17 [ERR] HealthCheck collector HostedService threw an error: Could not load file or assembly 'IdentityModel, Version=5.2.0.0, Culture=neutral, PublicKeyToken=e7877f4675df049f'. The system cannot find the file specified. System.IO.FileNotFoundException: Could not load file or assembly 'IdentityModel, Version=5.2.0.0, Culture=neutral, PublicKeyToken=e7877f4675df049f'. The system cannot find the file specified. File name: 'IdentityModel, Version=5.2.0.0, Culture=neutral, PublicKeyToken=e7877f4675df049f' at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReportAsync(HealthCheckConfiguration configuration) at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReportAsync(HealthCheckConfiguration configuration) at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReportAsync(HealthCheckConfiguration configuration) at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.Collect(CancellationToken cancellationToken) in /home/runner/work/AspNetCore.Diagnostics.HealthChecks/AspNetCore.Diagnostics.HealthChecks/src/HealthChecks.UI/Core/HostedService/HealthCheckReportCollector.cs:line 72 at HealthChecks.UI.Core.HostedService.HealthCheckCollectorHostedService.CollectAsync(CancellationToken cancellationToken) in /home/runner/work/AspNetCore.Diagnostics.HealthChecks/AspNetCore.Diagnostics.HealthChecks/src/HealthChecks.UI/Core/HostedService/HealthCheckReportCollectorHostedService.cs:line 84 2026-07-23 18:46:18 [DBG] Server asus-tuf:13136:15c8627b heartbeat successfully sent 2026-07-23 18:46:18 [DBG] 1 recurring job(s) processed by scheduler.
The following error occurred right after upgrading the abp version from 9.x to 10.5.0. The above error only occurs when the AddHealthChecksUI and MapHealthChecksUiEndpoints where used. If they are commented out, then the error message isn't produced. I have tried cleaning the local nuget packages, deleted bin, obj folders from all the projects folders. And there is no direct or transient reference to the package IdentityModel with that particular version. This issue produced only after upgrading the abp packages to 10.
5 Answer(s)
-
0
This error is thrown by AspNetCore.Diagnostics.HealthChecks UI’s background collector (
HealthChecks.UI.Core.HostedService.HealthCheckCollectorHostedService). In some dependency graphs (commonly after upgrading ABP to v10), the IdentityModel assembly that HealthChecks.UI expects is not copied to the output, so the hosted service crashes repeatedly with:Could not load file or assembly 'IdentityModel, Version=5.2.0.0'
Fix (recommended): add an explicit package reference to IdentityModel in the project(s) where you call
AddHealthChecksUI()/MapHealthChecksUiEndpoints()(typically*.HttpApi.Host, and in some solutions also*.Web):Option A (match the requested assembly version exactly):
<ItemGroup> <PackageReference Include="IdentityModel" Version="5.2.0" /> </ItemGroup>Option B (use the newer version ABP team suggested in a similar case):
<ItemGroup> <PackageReference Include="IdentityModel" Version="7.0.0" /> </ItemGroup>Then:
dotnet clean- delete
bin/objfor the affected host project(s) dotnet restore- rebuild + run
If you have multiple hosts/services each registering HealthChecks UI, add the reference to each of those host projects (only where the UI collector runs).
Links (validated):
- https://abp.io/docs/latest/solution-templates/microservice/health-check-configuration
- https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks
- https://www.nuget.org/packages/IdentityModel/
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hi,
This one comes from the IdentityModel package change in ABP 10.
Volo.Abp.IdentityModelused to bring the oldIdentityModelpackage in transitively, and in v10 it switched toDuende.IdentityModel. The HealthChecks UI background collector still needs the oldIdentityModelassembly (5.2.0.0) at runtime, so once nothing pulls it into the output anymore it can't find it and keeps throwing thatFileNotFoundException. That's also why you no longer see any direct or transitive reference to it.Add an explicit reference to the old package in the host project(s) where you call
AddHealthChecksUI()/MapHealthChecksUiEndpoints()(usually*.HttpApi.Host, and*.Webtoo if it registers the UI there):<PackageReference Include="IdentityModel" Version="7.0.0" />Then clean the
bin/objfolders and rebuild. Version 7.0.0 is the last release under the oldIdentityModelname and its assembly satisfies the 5.2.0.0 the collector asks for. The newly generated 10.x templates already include this line, so it's only existing solutions upgraded from 9.x that need it added by hand.Thanks
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hi Maliming, The issues that I have above said was arrested by applying fix that you have suggested. But now when I try to apply migration through the package manager console. I'm getting the following error.
PM> Update-Database Multiple startup projects set. Using project 'Bluestar\Bluestar_src\Bluestar.EntityFrameworkCore' as the startup project. Build started... Build succeeded. The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: E:\VS Repo\Products\Bluestar-API\src\Bluestar.Domain\Bluestar.Domain.csproj : warning NU1903: Package 'System.Security.Cryptography.Xml' 10.0.7 has a known high severity vulnerability, https://github.com/advisories/GHSA-23rf-6693-g89p [E:\VS Repo\Products\Bluestar-API\src\Bluestar.EntityFrameworkCore\Bluestar.EntityFrameworkCore.csproj]
I have tried setting the $ErrorActionPreference = "Continue" and <TreatWarningsAsErrors>false</TreatWarningsAsErrors>.
Please help to resolve this.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
NU1903is a NuGet security warning (known vulnerability). In your environment, NuGet/PMC is configured to treat security warnings as errors, soUpdate-Databasestops even though it says “warning”.ABP v10.4+ already moved several
Microsoft/Systempackages to 10.0.7 for CVE remediation; your warning is specifically aboutSystem.Security.Cryptography.Xml10.0.7. The practical fix is to upgrade to a non-vulnerable version of that package (or align packages to the ABP version that includes the bump), not to fightErrorActionPreference/TreatWarningsAsErrors.
1) Solution
A) Upgrade the vulnerable package to a fixed version (recommended)
Add an explicit reference (or update the existing one) in the project that ends up restoring it (often
*.Domain, but can be centralized viaDirectory.Packages.propsif you use it):<ItemGroup> <PackageReference Include="System.Security.Cryptography.Xml" Version="10.0.8" /> </ItemGroup>Then:
- Delete
bin/obj(you already did before, but do it again after changing versions) - Restore/build
- Run migrations again (preferably via
*.DbMigrator— see option C)
Notes:
- The exact “fixed” version depends on the advisory. Use the first patched version for
System.Security.Cryptography.Xmlthat your organization allows (10.0.8+ is the usual next patch line after 10.0.7). - If you manage packages centrally, pin it once in
Directory.Packages.propsinstead.
B) If your org policy blocks migrations due to NU1903, suppress only this warning (workaround)
If you’re allowed to proceed temporarily while you schedule a patch, suppress just that warning code in the startup/migrator project:
<PropertyGroup> <NoWarn>$(NoWarn);NU1903</NoWarn> </PropertyGroup>This is not the preferred approach; upgrading to a patched version is.
C) Use ABP’s recommended migration path (avoids PMC quirks)
ABP recommends running migrations via the
.DbMigratorapplication (it’s also CI/CD friendly). Build and runYourProject.DbMigratorinstead ofUpdate-Databasein PMC.2) Sources
- https://abp.io/docs/10.4/release-info/migration-guides/abp-10-4
- https://abp.io/docs/latest/release-info/upgrading
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hi,
Glad the health check one is sorted.
This second one isn't really a build error, it's a NuGet security audit warning (NU1903). In 10.5,
System.Security.Cryptography.Xmlgets pulled in transitively at10.0.7(through Hangfire), and a recent advisory flags that version as high severity. The Package Manager Console turns that restore-time audit warning into a terminating error, soUpdate-Databasestops right afterBuild succeeded. That's also whyTreatWarningsAsErrors=falseand$ErrorActionPreferencedidn't help, it's a restore/audit warning, not a compiler one.Pin the package to the patched
10.0.10(10.0.7,10.0.8and10.0.9are all still flagged). Add this to your*.Domainproject, since that's where it's being flagged, and it flows up to the projects that reference it:<PackageReference Include="System.Security.Cryptography.Xml" Version="10.0.10" />Then restore and run
Update-Databaseagain. If you use central package management, bump the<PackageVersion>for it inDirectory.Packages.propsinstead.Thanks
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)