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 ... 'System.Runtime.CompilerServices.Unsafe, Version 4.0.4.1

More
18 Jul 2024 15:18 #12964 by support
Hello.
I assume you meant OPC Studio 2024.1 and not 2014.1.

I am not sure about packages.config. When PackageReference is used, all that you need are the references to OpcLabs.QuickOpc packages, and not the transitive dependencies. Also with PackageReference, the assembly you mentioned should not normally appear in assembly references either - and when it is there, you are calling for a problem by referencing an improper version.

Try to streamline the project by removing the unnecessary references.

If that does not help, you can strip the project off most of your code, just leave the skeleton that shows the problem, and post it here and we will investigate.
But in VS2022, not in VS2017, we no longer support it.

Regards

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

More
17 Jul 2024 20:37 #12962 by tlaford
I recently upgraded my Visual Studio 2017 project to OPC Studio 2014.1.

When I open my GUI editor it says "Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified."

If I click on Ignore and Continue it removed the OpcLabs.EasyOpc.DataAccess.EasyDAClient from the GUI Designer.

I have 'System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0' installed as a Reference for my project.

packages.config includes this line:
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net472" />

app.config includes this block:
<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

How do I get rid of this error?

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

Moderators: support
Time to create page: 0.042 seconds