Hi,I am trying to integrate the C# .NET binding of the ALPR into a project I am working on. I have downloaded the pre-compiled DLL (64 bit) and added it as a reference into my C# project. Everything seems to compile OK, but when I run my application up I get the following:Could not load file or assembly 'openalpr-net.DLL' or one of its dependencies. The specified module could not be found.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'openalpr-net.DLL' or one of its dependencies. The specified module could not be found.Interestingly, if I run the DLL through DependencyWalker, I get the following error appear straight away:The dependency walker log states:Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.Error: Modules with different CPU types were found.Warning: At least one delay-load dependency module was not found.Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.I have also tried to integrate the 32 bit version and I get the same error when I try to run up the application but the dependency walker error does NOT appear with that version.If anyone could help with this, it would be most appreciated. My application is running .NET 4.5, if this helps at all.Thanks
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using openalprnet;
namespace ConsoleApplication26
{
class Program
{
static void Main(string[] args)
{
string country = "us";
string configFile = "C:\\Users\\xxxx\\Documents\\Visual Studio 2013\\Projects\\openalpr_32\\runtime_data\\config\\us.conf";
string runtimeDir = "C:\\Users\\xxxx\\Documents\\Visual Studio 2013\\Projects\\ConsoleApplication26\\ConsoleApplication26\\bin\\Debug";
AlprNet alpr = new AlprNet(country, configFile, runtimeDir);
AlprResultsNet result = alpr.recognize("C:\\xxxx\\cdehaven\\Documents\\Visual Studio 2013\\Projects\\openalpr_32\\samples\\us-2.jpg");
}
}
}
string configFile = "C:\\Users\\xxxx\\Documents\\Visual Studio 2013\\Projects\\openalpr_32\\runtime_data\\config\\us.conf";
string runtimeDir = "C:\\Users\\xxxx\\Documents\\Visual Studio 2013\\Projects\\ConsoleApplication26\\ConsoleApplication26\\bin\\Debug";
string config = "C:\\Users\\cdehaven\\Documents\\Visual Studio 2015\\Projects\\openalpr_32bit\\openalpr.conf";
string country = "us";
AlprNet alpr = new AlprNet(country, config, "");
AlprResultsNet res = alpr.Recognize("C:\\Users\\cdehaven\\Documents\\Visual Studio 2015\\Projects\\openalpr_32bit\\samples\\us-1.jpg");
Wow! YOU are good, Pawel. That's exactly it. I changed that 3rd parameter as follows and it came right up...
AlprNet alpr = new AlprNet(country, config, "C:\\Users\\cdehaven\\Documents\\Visual Studio 2015\\Projects\\openalpr_32bit\\runtime_data");