Closed guisantos closed 3 months ago
Hi, @guisantos.
Elastic.Apm.NetCoreAll
has always had a dependency on MongoDB.Driver.Core
. In v1.25.3, we updated the minimum supported dependency to 2.19.0 (from 2.4.4) due to a CVE.
ReadyToRun publishing fails here because the ZstdSharp
library uses code that is not AoT compatible. This is not a bug, simply a limitation of that library.
In your case, you can either publish without ReadyToRun or, if you do not require the MongoDB instrumentation, install the Elastic.Apm
package and any instrumentation packages you require and see if that works. Note, though, that we do not test the libraries for AoT and do not support that as some of our code relies on reflection, etc., which is likely to fail AoT compilation.
Oh, thanks @stevejgordon I'm was doing some cleanup and updates on references and this concerned me, I will do as you suggested using the Elastc.Apm package and add the instrumentations manually, I don't even need the mongodb stuff
The current version of MongoDB.Driver.Core (2.25.0) depends on ZstsSharp (0.7.3) which is AoT compatible
Closing as resolved.
APM Agent version
Elastic.Apm..NetCoreAll v 1.27.1
Environment
.NET Core 6 Windows 11
Application Target Framework(s) (e.g. net462, netcoreapp3.1): net6.0
Describe the bug
After updating Elastic.Apm..NetCoreAll from Version 1.25.0 to 1.27.1 a dependency to MongoDB.Driver.Core is added and a transitive dependency to MongoDB.Driver.Core called zstdsharp.port. The error happen when you try to publish the API solution to a folder.
To Reproduce
Steps to reproduce the behavior:
Try to to publish the application and you will receive the following error:
Expected behavior
DLLs and project dependencies publish to a folder
Actual behavior
Impossible to publish the project