✅ FileNotFoundException: Could not load file or assembly. The system cannot find the file specified.

I'm modifying an application using AsmResolver and adding a new assembly into the module references, but for some reason .NET can't find the referenced assembly even though it's right there in the same folder as the one I'm editing. Attached is a minimum reproducible example, and a video showing what's wrong. I also tried editing the .deps.json file, since this guy https://discord.com/channels/143867839282020352/1288099229834805248/1288099229834805248 had success with that and a similar problem, but that didn't do anything.
13 Replies
NoSkillPureAndy
where did my message go? I'm modifying an application using AsmResolver and adding a new assembly into the module references, but for some reason .NET can't find the referenced assembly even though it's right there in the same folder as the one I'm editing. This is .NET Core, not framework, so I can't use fuslogvwr.exe. I tried saving a .nettrace file and opening it with PerfView, but it failed to load it, and when I ignored the errors, it didn't have anything useful in it at all. I used Process Monitor to try finding the failed file load event for the DLL in hopes of finding something helpful, but it didn't seem to show up. Attached is a minimum reproducible example, and a video showing what's wrong. I also tried editing the .deps.json file, since this guy https://discord.com/channels/143867839282020352/1288099229834805248/1288099229834805248 had success with that and a similar problem, but that didn't do anything. If anyone knows how I can fix this or even just how I can get started debugging this problem, that would be incredibly helpful. Is there maybe a way that I could actually step through the code that throws this within the CLR or whatever?
NoSkillPureAndy
sorry for making like 50 edits lol
arion
arion2w ago
May be a dumb question, but have you trued adding "ToBeMadeADependency.dll" instead of just "ToBeMadeADependency" to the deps.json?
NoSkillPureAndy
i'll give it a shot
arion
arion2w ago
:AA_Uraraka_ThumbsUp:
NoSkillPureAndy
didn't do anything
arion
arion2w ago
I edited your deps.json file to this and it worked
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v6.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"ToBeEdited/1.0.0": {
"runtime": {
"ToBeEdited.dll": {},
"ToBeMadeADependency.dll": {}
}
}
}
},
"libraries": {
"ToBeEdited/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v6.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"ToBeEdited/1.0.0": {
"runtime": {
"ToBeEdited.dll": {},
"ToBeMadeADependency.dll": {}
}
}
}
},
"libraries": {
"ToBeEdited/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}
idk if this is ideal for you though
arion
arion2w ago
It also works on my machine if the deps.json is deleted
NoSkillPureAndy
thank you thank you i am forever indebted
arion
arion2w ago
:AA_Uraraka_ThumbsUp: $close
MODiX
MODiX2w ago
If you have no further questions, please use /close to mark the forum thread as answered
Want results from more Discord servers?
Add your server