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.
Please support PackageReference for NuGet packages
many thanks for the detailed report. No, you are not expected to do anything special to enable the assembly unpacking.
I will try to reproduce the problem with the project you provided on GitHub, and let you know then.
From our point of view, the problem is not in the fact that these App_Web_* assemblies are not present in the output. That should be OK by itself. We see the problem in the fact that you get an exception in that case.
Best regards
Please Log in or Create an account to join the conversation.
If I make a very simple project which calls EasyDAClient.Create() and simply add OpcLabs.QuickOpc using PackageReference, then I get a stacktrace when running. But if I use packages.config, I don’t. The only difference I can tell is that packages.config results in the App_Web_OpcLabs.EasyOpcClassicRaw.*.dll files being copied. Otherwise, it might actually be a bug in NuGet/VisualStudio. If the latter, I will try to find a workaround.
Here is a side-by-side screenshot: i.imgur.com/xKUmX4b.png . The project on the left is at github.com/binki/QuickOpcPackagesConfig . The project on the right is at github.com/binki/QuickOpcPackageReference .
Here is my stacktrace from the PackageReference project:
Here is the directory listing of the packages.config’s bin/Debug:
Here is the directory listing of the PackageReference’s bin/Debug:
I am still convinced that I get the different behavior because one directory has the App_Web_* assemblies copied to it whereas the other one doesn’t. If I compile the project, then manually copy over App_Web_OpcLabs.EasyOpcClassicRaw.*.dll before trying to run it, then I don’t get the crash.
I’m using OpcLabs.QuickOpc-5.53.315 via nuget.
I found this NuGet bug: github.com/NuGet/Home/issues/7276#issuecomment-423029619 . In this bug, it states that PackageReference *should* behave like packages.config by copying all files from the nuget’s lib/net452 folder to my project’s output directory. If the native code should automatically be unpacked and loaded, then the statement I made in that bug is incorrect. However, unless I’m mistaken, the empirical evidence is otherwise…. Since NuGet says it’s a bug, it’s possible that a future implementation of PackageReference itself will correctly copy all of the files and in the meantime I can try to write up a workaround in my .csproj file.
Am I supposed to somehow initialize the library to trigger the assembly unpacking? If so, I never realized that before. Please let me know.
Thanks for any help!
Please Log in or Create an account to join the conversation.
Do you actually have a problem in terms that something does not work as it should? If so, please describe it (guidelines: www.opclabs.com/forum/announcements12/2365-rules-for-forum-posts ). If you just think that these files should be in your output folder, but everything else works, then it is as designed, and there is no problem to speak about, as explained above.
Best regards
Please Log in or Create an account to join the conversation.
Please consider testing your packages with a VisualStudio-15.8 .csproj which references the NuGet using PackageReference instead of packages.config and verify that the bin/Debug folder contains the necesary App_Web_OpcLabs.EasyOpcClassicRaw.amd64.dll and App_Web_OpcLabs.EasyOpcClassicRaw.x86.dll files. Maybe these need to be added to as references to the .nuspec and a version bump released to get it to work?
Thanks!
Please Log in or Create an account to join the conversation.