Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

could not load file or assembly 'OpcLabs.EasyOpcClassicRaw.amd64' or one of its dependencies. An attempt was made to load a ..

More
27 Feb 2015 19:32 #2866 by support
A true fix for this is now ready, but due to the nature of the changes involved, it will go to the upcoming version (5.33) - preliminary release date is April.

Please Log in or Create an account to join the conversation.

More
04 Feb 2015 13:11 #2696 by giles

Please Log in or Create an account to join the conversation.

More
04 Feb 2015 11:03 - 04 Feb 2015 11:09 #2694 by support
I can confirm the problem. It appears with other Web projects, too. It has to do with the new method of loading the internal assemblies. What happens there is that we (intentionally) reference both the so-called mixed-mode assemblies (assemblies created in C++ that contain native and managed code), one for 32-bit and other for 64-bit windows. During runtime, we reference and load the appropriate one. This works well in normal applications, but you have discovered a problem that affects all Web applications.

It appears that with Web applications, the host loads *all* assemblies right at the beginning, without waiting until they are actually needed. Therefore, when you run your Web app in a 32-bit environment, the 32-bit assembly will load fine but the 64-bit assembly has a "wrong format" and will not load. Conversely, when you run your Web app in a 64-bit environment, the 64-bit assembly will load fine but the 32-bit assembly (which we do not need) has a "wrong format", will not load, and will prevent the whole app from working.

Finding a solution for this won't be easy. But there already is a workaround: Whate happens is that the loader tries to load all assemblies it finds (in App_Code folder), but does not complain when an unneeded assembly is missing. If you manually remove the unwanted assembly (the one listed in the exception message) from the 'bin' subfolder of your project before running the app, it will work. There are, however, issues with this approach, such as:

1) You need to know upfront whether you are going to run the app in a 32-bit or 64-bit process.
2) Every project rebuild will place the assembly back to 'bin'. I think that this might be overcome by a custom build step.

I will need to have a deeper look at how to handle this issue, and more time.

Best regards

Note: 'amd64' is a correct designation under Intel processors as well. This is due to historical reasons of the processor development: The Intel's own 64-bit architecture (Itanium, IA64) has not been truly successful, besides a narrow market. AMD has come with much more successful 64-bit architecture, which Intel later copied is now using it basically everywhere. Hence the name 'amd64' in the assemblies. en.wikipedia.org/wiki/X86-64 , and more through Google...
Last edit: 04 Feb 2015 11:09 by support.

Please Log in or Create an account to join the conversation.

More
03 Feb 2015 21:04 - 04 Feb 2015 09:08 #2690 by giles
See enclosed vs project - it would be interesting to know if this works for you

btw I ran this on a windows 8 pc too and it does exactly the same thing

(edited - removed binary files from solution)
Attachments:
Last edit: 04 Feb 2015 09:08 by giles.

Please Log in or Create an account to join the conversation.

More
03 Feb 2015 20:55 #2689 by giles
Hi, I hadn't uninstalled 5.31 first but I have now and the gac is free of opclabs assemblies but I still get the error with 5.32.

I maybe make a sample project and send it you

cheers

Please Log in or Create an account to join the conversation.

More
03 Feb 2015 20:28 #2688 by admin
Have you followed the installation instructions in What's New, and uninstalled QuickOPC 5.31 first, in order to remove the assemblies from the GAC?

If not and if this is the cause, the remedy would be either to manually remove the 5.31 assemblies from the GAC, or to (and that's kind of cumbersome): 1) install 5.31, 2) uninstall 5.31, 3) install 5.32 again.

Please Log in or Create an account to join the conversation.

More
03 Feb 2015 20:14 #2687 by giles
sorry about the multiple replies - if I enable 32 bi8t ap0plications in the app pool it comp0laiunes about the amd assembly - if I don't it complains about the x86

Please Log in or Create an account to join the conversation.

More
03 Feb 2015 20:06 #2686 by giles
mm that's odd I just refreshed the page and it has the same error message but for 'OpcLabs.EasyOpcClassicRaw.x86'

Please Log in or Create an account to join the conversation.

More
03 Feb 2015 20:04 #2685 by giles
I see from the pdf that : "Packaging
- QuickOPC.NET now uses a different method to load the low-level assembly for a current processor architecture. The earlier method created a low-level assembly file in a temporary directory. The new method uses two new assemblies (OpcLabs.EasyOpcClassicRaw.amd64 and OpcLabs.EasyOpcClassicRaw.x86) that are dynamically loaded, but not directly referenced. The new method allows faster startup, and does not require access (permissions) to the temporary directory. Note that these new assemblies need not to (and should not be) directly referenced from your projects. "

I'm running a hyper v VM on windows 2012 with a 64 bit four core intel xeon processor. Something somewhere seems to think I have amd...

Please Log in or Create an account to join the conversation.

More
03 Feb 2015 19:54 #2684 by giles
.. program with an incorrect format'

I was using 5.31 in my asp.net (net 4.51) app - I upgraded to 5.32 and I get this error.

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.060 seconds