Could not load file or assembly…
Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
29 Replies
Happening when app runs. Bringing redirects have been added to every
app.config
and web.config
there is in the solution. Don’t know what else to try.well does the file exist in the output dir?
and if it does which version is it
That’s the thing. I don’t know which assembly needs it
you are starting an app that throws that error... in the folder where oyu are starting the app from is there a i asume a System.Diagnostics.DiagnosticSource.dll?
It’s not in the bin directory of the startup project
If that’s what you mean
jea that was what i meant
Hmmm, that’s a problem then
Why would it not be there
are you using any buildevents to copy dlls or so?
Not that I know of
hmm in the obj folder there is projectname.assets.json, can you open that and search for System.Diagnostics.DiagnosticSource.. maybe you can find what is depending on it there
I have no such file
This is a netfx project fwiw
ah its usually hidden
in the same folder as the bin folder
Not obj?
?
You said in the obj folder
Obj and bin are separate
k if nothing else helps.. there are tools like depencywalker that tell you which dll is dependent on which dlls...
ilspy can do this rudimentarly aswell
jea i meant obj and bin are side by side in the same folder
asuming you didnt change outputpath
Yeah that file is not there
ok
In either bin or obj
lemme guess this is not a sdk style project and you are using nugetreference.json or however it was calle din the past..xD
GitHub
GitHub - mikehadlow/AsmSpy: Simple command line assembly reference ...
Simple command line assembly reference checker. Contribute to mikehadlow/AsmSpy development by creating an account on GitHub.
or like i wrote
https://github.com/icsharpcode/ILSpy
GitHub
GitHub - icsharpcode/ILSpy: .NET Decompiler with support for PDB ge...
.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform! - icsharpcode/ILSpy
two great tools to find stuff like this
Maybe. I’m not sure
well doesnt matter.. just try one of these tools
I heard dotPeek can do this too
sure i dont care
use whatever needed.. if you prefer dotpeek use it i just dont see the need to install some paid software if there are great oss solutions
I actually have no idea what DLLs I need to be inspecting
All of the ones from my assemblies in the bin?
jea just load them all then use the search
in dotpeek and ilspy
asmspy would load the dependencies recursively based on startassembly