Commercial release 2.1 NuGet package gives build error
JohnTenney opened this issue · comments
When I install the Emgu.TF.runtime.windows.cuda-CR.2.1.0.838.nupkg package, I get the following build error:
emgu.tf.runtime.windows.cuda.dnn\7.4.2\build\Emgu.TF.runtime.windows.cuda.dnn.targets(21,5): error : 'X86 or AnyCPU is targeted, but this DNN package do not support 32-bit'
I do not get these build errors from EmguCV or if I reference the DLL files directly. My application is a 64-bit app. While I normally configure the build as "AnyCpu", I set "Prefer 32-bit" to false. Even if I configure the app as 64-bit, I get this error.
Hi John. Tensorflow only support 64-bit on Windows. It cannot be compiled into 32bit binary (for windows).
Our Emgu TF release package detect if the compiled target target x86 or AnyCPU. If so, they will get an runtime error (PInvoke exception). If you compile a binary to target AnyCPU, and deploy it to a machine that use an x86 CPU, e.g. certain low-end windows tablet even though it is rare, it will try to run in x86 mode and result in the run time error. The error message is there to prevent that.
Please set the compilation target to x64 to avoid the compile time error message. Note that you need to set the project configuration to x64, not the solution configuration. You can have the solution configuration set to anything, as long as the project the configuration under that particular solution configuration is set to x64 you will be good to go.
Open CV can be compiled to target x86 and x64. Emgu CV package contains both x86 and x64 binary. As a result, we do not need to check if the project target x86 or x64. It will work in both modes.
My application is pure 64-bit. I do compile in AnyCpu mode. Yet I was getting the x86 error. If you are able to remove the check in your package for 64 bit, it will probably work fine.
The current nuget runtime package (v2.6.0) no longer check for platform targets through build task. Closing ticket now.