Unhandled exception of type "system. io.file notfoundexception" is in an unknown module. Failed to load the file or assembly "system. runtime, version = 7.0.0, culture = neutral, public key token = b03f7f11d50a3a" or one of its dependencies.

CongMa 0 Reputation points
2023-09-19T11:04:34.6166667+00:00

I created a project for a console application (. NET Framework) and referenced a DLL for the YOLOv8 model generated by C # code. I want to infer images in this project by referencing the DLL for YOLOv8. However, at runtime, the prompt "Unhandled exception of type" system. io. file not found exception "is in an unknown module. Failed to load the file or assembly" system. runtime, version=7.0.0, culture=neutral, public key token=b03f7f11d50a3a "or one of its dependencies.

namespace ConsoleApp8
{
    internal class Program
    {
        static void Main(string[] args)
        {
            YOLOv8.Detectdemo.DetectDemo(@"D:/depoly/YOLOv8-main2/YOLOv8-main/Source/YoloV8.Demo/assets/input/0726145932.bmp");
        }
    }
}
//The picture is the result of the reference.

Developer technologies Visual Studio Other
Developer technologies C#
{count} votes

1 answer

Sort by: Most helpful
  1. KOZ6.0 6,655 Reputation points
    2023-09-19T16:56:42.0833333+00:00

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.