garnet icon indicating copy to clipboard operation
garnet copied to clipboard

Garnet Worker net9.0 does not run

Open ryanheath opened this issue 7 months ago • 4 comments

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

  1. Download v1.0.64 asset file win-x64-based-readytorun.zip
  2. In folder net9.0\Service there is file Garnet.worker.exe
  3. Verify it does not run
  4. In folder net8.0\Service there is file Garnet.worker.exe
  5. Verify it does run

Expected behavior

No response

Screenshots

running net8.0 version

Image

faulty net9.0 version

Image

Release version

v1.0.64

OS version

Image

ryanheath avatar May 12 '25 10:05 ryanheath

I can confirm that the failure was introduced into build 61 ... investigating further

darrenge avatar May 14 '25 22:05 darrenge

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?"

darrenge avatar May 14 '25 23:05 darrenge

This PR should fix the issue: https://github.com/microsoft/garnet/pull/1209

darrenge avatar May 20 '25 17:05 darrenge

@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

darrenge avatar May 21 '25 16:05 darrenge

This release fixes this bug: https://github.com/microsoft/garnet/releases/tag/v1.0.66

darrenge avatar May 22 '25 20:05 darrenge