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.

Unnecessary warnings messages are thrown in code compile, isolate these warnings

More
14 Dec 2023 16:43 #12478 by support
Hello.
The messages are well known and should be ignored. There is nothing that can be done about them (except suppressing them for msbuild).

Explanation:

QuickOPC contains some assemblies written in C++/CLR. Such assemblies cannot be compiled for "AnyCPU". They need to target a specific processor bitness - either x86, or x64. We thus have the same assembly compiled for both. And in the runtime, we always load just the correct one.

The compiler, however, has no way of knowing what happens in runtime. If you compile the whole project for x86, the assembly for x64 will look "wrong" to the compiler, even though it never gets loaded. Vice versa, if you compile for x64, the assembly for x86 will look wrong to the compiler. If you compile to AnyCPU, which is most common, BOTH will look wrong to the compiler. But it is all perfectly fine.

Best regards

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

More
14 Dec 2023 16:14 #12477 by chandresekaran
our applications are completely warnings free, we need to resolve these and isolate in our build process, please can you check this.

1>
Build started: Project: ConsoleApp9, Configuration: Debug Any CPU
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2364,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "App_Web_OpcLabs.EasyOpcClassicRaw.amd64, Version=5.71.401.1, Culture=neutral, PublicKeyToken=6faddca41dacb409, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2364,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "App_Web_OpcLabs.EasyOpcClassicRaw.x86, Version=5.71.401.1, Culture=neutral, PublicKeyToken=6faddca41dacb409, processorArchitecture=x86", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
1> ConsoleApp9 -> C:\Users\****\source\repos\ConsoleApp9\ConsoleApp9\bin\Debug\ConsoleApp9.exe
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Build started at 11:08 AM and took 01.128 seconds ==========
Attachments:

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

Moderators: support
Time to create page: 0.043 seconds