Repository navigation
Retarget ACE.Common, ACE.Entity and ACE.DatLoader to net10.0 - #4562
Merged
Merged
Conversation
The three libraries still targeted netstandard2.0, from the 2017 move off .NET Framework. Everything that references them targets net10.0. Since ACE.Common moved to Microsoft.Extensions.Logging 10.0.15 (ACEmulator#4545), publishing the whole solution into one folder (dotnet publish ACE.sln -o, warning NETSDK1194) lets the netstandard2.0 copies of Microsoft.Extensions.DependencyInjection(.Abstractions) overwrite the server's net10.0 ones. Those reference Microsoft.Bcl.AsyncInterfaces, which ACE.Server.deps.json does not list, so the first DbContext throws FileNotFoundException. With every project on net10.0, all of them resolve the same package assets. Also drops the package references that net10.0 provides in-box: System.Text.Json (ACE.Common), System.Numerics.Vectors (ACE.Entity) and System.Text.Encoding.CodePages (ACE.DatLoader). The server already used the in-box copies: none of the three is in master's ACE.Server.deps.json. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
Since #4545, a server built by publishing the whole solution into one folder fails at its first database access:
ACE.Common,ACE.EntityandACE.DatLoaderstill targetnetstandard2.0, a choice made in the 2017 move off .NET Framework (Major migration from .net framework 4.6.1 to .net standard/core 2.0 #573). Everything that references them targetsnet10.0.ACE.CommontoMicrosoft.Extensions.Logging10.0.15. Fornetstandard2.0, that brings in thenetstandard2.0builds ofMicrosoft.Extensions.DependencyInjectionandMicrosoft.Extensions.DependencyInjection.Abstractions10.0.15. These referenceMicrosoft.Bcl.AsyncInterfaces10.0.15 (assembly version 10.0.0.15), and theirnet10.0builds don't.dotnet publish Source/ACE.sln -o <dir>publishes every project into the same folder, thenetstandard2.0libraries included. The SDK warns about this with NETSDK1194.net10.0copies.Microsoft.Bcl.AsyncInterfaces.dlllands in the folder too, butACE.Server.deps.jsondoesn't list it, so the runtime won't load it.DbContextthen throws.netstandard2.0copies in the folder. On the commit before Bump Microsoft.Extensions.Logging from 9.0.22 to 11.0.0 #4545 it comes out clean. Publishing onlyACE.Server.csproj, as the Dockerfile and AppVeyor do, was never affected.The fix
TargetFrameworkgoes fromnetstandard2.0tonet10.0in the three projects. All projects then resolve the samenet10.0package assets, so merging their outputs can no longer swap a different build in.The package references that
net10.0provides in-box are dropped:System.Text.Json(ACE.Common)System.Numerics.Vectors(ACE.Entity)System.Text.Encoding.CodePages(ACE.DatLoader)The server already used the in-box copies: none of the three is in master's
ACE.Server.deps.json.What it changes for other consumers
net10.0.ACE.Server, and none of the three is published to NuGet.ACE.Server, which is alreadynet10.0.netstandard2.0didn't have. Decompiled comparison pending.Testing
Pending: build and warnings against master, the four test projects, a decompiled diff of the three libraries, and the solution-wide publish that broke.
Files
Source/ACE.Common/ACE.Common.csprojSource/ACE.Entity/ACE.Entity.csprojSource/ACE.DatLoader/ACE.DatLoader.csproj🤖 Generated with Claude Code