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.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
3,777 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
8,963 questions
{count} votes

1 answer

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