Garnet Worker net9.0 does not run
Describe the bug
The net9.0's v1.0.64 of the Garnet.worker.exe does not work or run.
It fails with exception:
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'System.Diagnostics.EventLog, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified. File name: 'System.Diagnostics.EventLog, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' at Microsoft.Extensions.Logging.EventLog.EventLogLogger..ctor(String name, EventLogSettings settings, IExternalScopeProvider externalScopeProvider)
But the file System.Diagnostics.EventLog.dll is present in the Service folder of the release.
The net8.0 version does run.
One thing I noticed in the win-x64-based-readytorun.pubxml file, it seems the libs from net8.0 are also copied for the net9.0 version, maybe that is the bug?
See
Also the net80\Service folder has a few dlls more than net90\Service folder. For instance
- Microsoft.Bcl.Memory.dll
- System.Diagnostics.DiagnosticSource.dll
- System.IO.Pipelines.dll
- System.Text.Encodings.Web.dll
- System.Text.Json.dll
Side note, there are a lot of extra dlls, compared to the standalone executable of Garnet. But that is probably any other story ...
Steps to reproduce the bug
- Download v1.0.64 asset file win-x64-based-readytorun.zip
- In folder net9.0\Service there is file Garnet.worker.exe
- Verify it does not run
- In folder net8.0\Service there is file Garnet.worker.exe
- Verify it does run
Expected behavior
No response
Screenshots
running net8.0 version
faulty net9.0 version
Release version
v1.0.64
OS version
I can confirm that the failure was introduced into build 61 ... investigating further
It looks like you this could be the issue "One thing I noticed in the win-x64-based-readytorun.pubxml file, it seems the libs from net8.0 are also copied for the net9.0 version, maybe that is the bug?"
This PR should fix the issue: https://github.com/microsoft/garnet/pull/1209
@ryanheath This will be in the next release. The most recent build where it is working is at: https://github.com/microsoft/garnet/releases/tag/v1.0.60
This release fixes this bug: https://github.com/microsoft/garnet/releases/tag/v1.0.66