I get a System.IO.FileException
when my process attempts to load this assembly: System.Diagnostics.EventLog Version=8.0.0 PublicKey={identical to the one that's in the bin folder}
.
When I do AppDomain.CurrentDomain.GetAssemblies()
it’s only in the list of assemblieswhen I’m running directly, not when done via process.start().
The application that does the process.start() imports only one project (the project being started) so that it has the executable in it’s build output. It then calls the path of that executable. It also has the same .csproj
config: DebugType: Full, Optimize: False
I have tried manual Assembly.Load(), I have tried saving the nameof(System….Logs).
When attaching the debugger to the started process and evaluating new System.Diagnostics.EventLog()
we get:
The type name 'EventLog' could not be found in the namespace 'System.Diagnostics'. This type has been forwarded to assembly 'System.Diagnostics.EventLog, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly.
How do I get this assembly to load when using process.start()?