3

Using Windows it is possible to enable Fusion assembly logs via registry (https://techcommunity.microsoft.com/t5/iis-support-blog/fusion-log-viewer-fuslogvw-exe/ba-p/784396) to be saved on local hard drive. My .NET Core 3.1 application is working properly on Windows. On Docker container based on Linux I'm getting randomly "Could not load file or assembly" for some assemblies, which actually are available in proper place in build directory and for some runs they work properly.

Sample assembly error: Could not load file or assembly 'Renci.SshNet, Version=2016.1.0.0, Culture=neutral, PublicKeyToken=1cee9f8bde3db106'. The system cannot find the file specified.

I would like to enable debug logging related to assemblies to find a root cause of described issue.

Can I enable anyhow fusion logs on Linux?

biteMe
  • 41
  • 2
  • Reveal the actual assembly involved and the actual error message please. Your paraphrasin* hides the most important information. – Lex Li Jun 24 '20 at 14:19
  • Fusion is a WinForms program, they don't work on Linux. – fredrik Jun 24 '20 at 14:21
  • @fredrik indeed fusion log viewer is Winforms app, however logs collection does not require viewer at all. Logs appear on drive even if no SDK is installed. – biteMe Jun 24 '20 at 14:23
  • Maybe this is for you: https://github.com/dotnet/runtime/issues/7693 – fredrik Jun 24 '20 at 14:37
  • COREHOST_TRACE=1 is enabled, it gives lots of logs however nothing leading to an issue with missing assembly. Assembly DLL is in bin/Debug folder, mysteriously sometimes it's not found when executing code. Trace logs in console simply print same exception I've pasted in first post. – biteMe Jun 24 '20 at 14:48
  • I think that the Renci.SshNet version you have does not support .NET Core. Seems to be added in 2020.0.0-beta1. See https://github.com/sshnet/SSH.NET/releases. If it works on windows, that's probably just luck. – fredrik Jun 24 '20 at 15:59
  • Renci.SshNet 2016.1.0 supports .NET Standard 1.3, hence .NET Core 3.1 works as well (https://learn.microsoft.com/en-us/dotnet/standard/net-standard). It works properly on Windows and Linux. It also works well on docker linux, just sometimes throws "Could not load file or assembly..." exception. Same setup, same build, same files, same container. Sometimes works fine, sometimes throws exception. This is why I wanted to enable additional logging regarding assemblies. I've also tried using this 2020.0.0-beta1, nothing changes - sometimes it throws "Could not load file or assembly...". – biteMe Jun 24 '20 at 17:42
  • I'm trying `dotnet-trace` that comes with net 5. ref: https://devblogs.microsoft.com/dotnet/announcing-net-5-0-preview-8/#dump-debugging – Erdogan Kurtur Dec 17 '20 at 04:39

0 Answers0