-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Description
Hi,
I had a crazy, self-produced problem with the last Runtime.
Configuration: Old service, created 2008 with NET.Remoting, later updated to WCF, now running as NET.8 minimal API IIS InProcess-hosted. Connected from Sql-Server via NET.4.8-Assembly with System.Net.HttpWebRequest, but the client isn't problem-relevant.
Own code uses some external dll, Mailkit/Mimekit, SSH.NET, System.IO.Compression.ZipFile.
Mailkit is immediately used after restart, sends a notification mail. So the Mailkit.dll is loaded.
ZipFile is rare used, may be only one time per month.
--
2025-07-08: Added the NET.8.0.412 SDK with the new 8.0.18 runtime. No restart of the service. Service runs with 8.0.17.
2025-07-18: Executing of the code that uses ZipFile crashed. File not found. The C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.17 directory was deleted, instead, a 8.0.18 directory exists.
Restarting the application fixed the problem. Ok, in theory, problem solved.
--
But: It's a general problem. Sometimes a restart / reboot isn't immediately (after SDK-Update) possible. Installing the new runtime 20:30, patching the whole server 01:50 with a reboot. If ZipFile is used the first time between, it would crash.
So idea / question: Is there something like a switch / command line option / config file option, that tells the application: Find and load all dependend DLL immediately after a restart. The delay would not be a problem. Result: All dlls are copied, the 8.0.17 directory isn't longer required. A newer version can delete that directory without affecting running services.
Additional benefit: If a dll is missing / can't be loaded, the application would crash / no start possible. A crash would only affect the test system, so that's not a problem.
Workaround: The old directory not immediately deleted, only in combination with the next reboot. May be there is a standard installation switch to delay the deletion.
PS: Deleting the old directory in general is a good idea. Nobody needs a list of older, never again used patches 8.0.1/8.0.2 etc., if 8.0.18 is installed and used.