I'm getting the below error on a brand new production machine running windows server 2016. The below dll is from a nuget reference from Spitfire (https://github.com/RainwayApp/spitfire). The exact same code runs perfectly fine on my Windows 10 dev machine.
How do I figure out what is wrong on the production machine?
System.IO.FileNotFoundException: Could not load file or assembly 'Spitfire.dll' or one of its dependencies. The specified module could not be found.
File name: 'Spitfire.dll'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at Owin.Loader.DefaultLoader.AssemblyDirScanner.<GetEnumerator>d__1e.MoveNext()
at Owin.Loader.DefaultLoader.SearchForStartupAttribute(String friendlyName, IList`1 errors, Boolean& conflict)
at Owin.Loader.DefaultLoader.GetDefaultConfiguration(String friendlyName, IList`1 errors)
at Owin.Loader.DefaultLoader.LoadImplementation(String startupName, IList`1 errorDetails)
at Owin.Loader.DefaultLoader.Load(String startupName, IList`1 errorDetails)
at Microsoft.Owin.Hosting.Engine.HostingEngine.ResolveApp(StartContext context)
at Microsoft.Owin.Hosting.Engine.HostingEngine.Start(StartContext context)
at Microsoft.Owin.Hosting.Starter.HostingStarter.Start(StartOptions options)
at Communication.WebRTC.WebRTCHandshaker.WebRTCLoop(String url) in F:\SW\DedicatedServer\Communication\WebRTC\WebRTCHandshaker.cs:line 56
Update 1
Used .NET assembly dependency walker on the spitfire.dll. on my LOCAL machine Got this result. Nothing sticks out to me. Doing the production server shortly and will update.
Update 2:
Not sure what I'm supposed to be seeing, but this is from the production server.
Update 3:
Printing the below values both yield the correct values to the working folder or exe on the production server.
System.Reflection.Assembly.GetEntryAssembly().Location.ToString()
Environment.CurrentDirectory