FYI, this actually turned out to be a bug since v1.9.18.
With v2.1.5, you no longer need to use the above workaround and it should work out of the box.
Version 2.1.5 - January 9, 2020
Fixed: "Unable to load file or assembly 'VideoEngine ..." error after adding VideoUltimate to a non-web project (Windows Forms, Console).The same error also happened if you did not you call AddGleamTech and UseGleamTech methods in an ASP.NET Core project.
Improved: Stability of video processing.
Added: New GleamTechConfiguration.EnsureAssemblies method which ensures GleamTech's assemblies are loaded and initialized.You may need to call this method in entry point/startup of your application, if you receive "Could not load file or assembly ..." errors.
Some DLLs are embedded inside GleamTech's DLLs and they are resolved automatically when they are requested howeverinternal AssemblyResolver should be initialized first and internal AssemblyResolver of each GleamTech DLL can be initializedonly when a type inside that DLL is accessed first. So in some cases, even a GleamTech DLL is loaded, its AssemblyResolvermay not be initialized yet (because none of its types is accessed yet). You can observe this behaviour if your applicationcalls some methods which scans assemblies for reflection purpose (reflection-only type access does not trigger DLL's module initializer),for example ASP.NET Core's endpoints.MapControllers method and SimpleInjector's RegisterMvcControllers method.So to prevent errors on those methods, you can call this method before such methods.
Note that you should not need to call this method usually for web applications, because it is handled automaticallyas we can know when the application is started by hooking up (automatically in ASP.NET Classic and when you call AddGleamTech andUseGleamTech methods in ASP.NET Core).
Changed: In previous versions, invalid values for GleamTech related configuration keys (e.g in Web.config or appsettings.json) wassilently ignored (exceptions were swallowed). From now on, invalid property values in config files will throw exceptions just like whenthey are set in code. This is especially useful for "VideoUltimate:LicenseKey" property, i.e you should instantly know if you put an invalid licensekey (empty string for "VideoUltimate:LicenseKey" property will also throw) without silently falling back to trial mode.
Only for some edge cases, you can use this new method (described above) instead of the workaround: