Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET Core detection seems to need support .NET 5 or more #1301

Closed
emaame opened this issue Aug 7, 2021 · 1 comment · Fixed by #1304
Closed

.NET Core detection seems to need support .NET 5 or more #1301

emaame opened this issue Aug 7, 2021 · 1 comment · Fixed by #1304
Labels
bug Something isn't working

Comments

@emaame
Copy link

emaame commented Aug 7, 2021

Summary of your issue

OpenCvSharp.OpenCvSharpException: 'Failed to find dll "OpenCvSharpExtern", for processor architecture AMD64.' is thrown when create Mat at first time on .NET 5.
But it can ignore and it seems everything works fine.
I doubt WindowsLibraryLoader.cs#L110 misses to detect .NET 5 or more.

Environment

  • Visual Studio 2019 / .NET 5.0.8
  • OpenCvSharp 4.5.3.20210725

What did you intend to be?

I guess, .NET Core detection needs to support .NET 5 or more (WindowsLibraryLoader.cs#L110).

            return RuntimeInformation.FrameworkDescription.StartsWith(".NET Core", StringComparison.Ordinal);

RuntimeInformation.FrameworkDescription returns

  • .NET 5 : ".NET 5.0.8"
  • .NET 6 (VS2022 preview 2) : ".NET 6.0.0-preview.6.21352.12"

I cannot show right answer is but it may check with Regex like @"^.NET (\d|Core)" or reject "NET Framework"?

@emaame emaame changed the title .NET Core detection needs to support .NET 5 or more .NET Core detection seems to need support .NET 5 or more Aug 7, 2021
@shimat shimat added the bug Something isn't working label Aug 7, 2021
@shimat
Copy link
Owner

shimat commented Aug 7, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants