C
C#6mo ago
Mango

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
Mango
MangoOP6mo ago
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.
ACiDCA7
ACiDCA76mo ago
well does the file exist in the output dir? and if it does which version is it
Mango
MangoOP6mo ago
That’s the thing. I don’t know which assembly needs it
ACiDCA7
ACiDCA76mo ago
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?
Mango
MangoOP6mo ago
It’s not in the bin directory of the startup project If that’s what you mean
ACiDCA7
ACiDCA76mo ago
jea that was what i meant
Mango
MangoOP6mo ago
Hmmm, that’s a problem then Why would it not be there
ACiDCA7
ACiDCA76mo ago
are you using any buildevents to copy dlls or so?
Mango
MangoOP6mo ago
Not that I know of
ACiDCA7
ACiDCA76mo ago
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
Mango
MangoOP6mo ago
I have no such file This is a netfx project fwiw
ACiDCA7
ACiDCA76mo ago
ah its usually hidden in the same folder as the bin folder
Mango
MangoOP6mo ago
Not obj?
ACiDCA7
ACiDCA76mo ago
?
Mango
MangoOP6mo ago
You said in the obj folder Obj and bin are separate
ACiDCA7
ACiDCA76mo ago
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
Mango
MangoOP6mo ago
Yeah that file is not there
ACiDCA7
ACiDCA76mo ago
ok
Mango
MangoOP6mo ago
In either bin or obj
ACiDCA7
ACiDCA76mo ago
lemme guess this is not a sdk style project and you are using nugetreference.json or however it was calle din the past..xD
ACiDCA7
ACiDCA76mo ago
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.
ACiDCA7
ACiDCA76mo ago
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
ACiDCA7
ACiDCA76mo ago
two great tools to find stuff like this
Mango
MangoOP6mo ago
Maybe. I’m not sure
ACiDCA7
ACiDCA76mo ago
well doesnt matter.. just try one of these tools
Mango
MangoOP6mo ago
I heard dotPeek can do this too
ACiDCA7
ACiDCA76mo ago
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
Mango
MangoOP6mo ago
I actually have no idea what DLLs I need to be inspecting All of the ones from my assemblies in the bin?
ACiDCA7
ACiDCA76mo ago
jea just load them all then use the search in dotpeek and ilspy asmspy would load the dependencies recursively based on startassembly
Want results from more Discord servers?
Add your server