0

Getting a FileNotFoundException for a reference to a .NET Framework 4.6.2 library out of a .NET Framework 4.6.2 library that was loaded by a .NET 5 project.

Tried all known solutions:

Interestingly, the Fusion Log does not list any access attempt to the problematic dll file.

Compiled the project via Rebuild, nothing helped.

Nicolas
  • 754
  • 8
  • 22
  • Did you check if it is in the output folder for .net5, or if it is in the target framework folder for net462? – Mafii Dec 20 '22 at 11:23
  • How are you referencing the library? I think more details are needed. The posts linked are about unmanaged DLLs I think, but this is .NET referencing which is a different mechanism. – John Alexiou Dec 20 '22 at 14:21
  • yes, it was linked as managed dll and the dll was copied to the output folder – Nicolas Dec 21 '22 at 16:00

1 Answers1

0

After having created a completely new library and placed only the isolated method there that needs to be accessed and the error reoccurred also, it was clear, that this isn't a setup problem.

Solved this problem with the Clean Solution command!

This command is available:

  • in the context menu of the solution entry in the Solution Explorer
  • in the Build menu of visual studio
Nicolas
  • 754
  • 8
  • 22