-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IOException: Sharing violation on path "..\plctag.dll" #177
Comments
Upon some further investigation I've realized that what first happens is I get an "EntryPointNotFound" exception. After this exception is thrown and the program is run again, I get the sharing violation instead. This process can be reproduced when I delete the plctag.dll. So the original issue may just be that I have the wrong information for the tag. |
You may realize this (or have figured it out) but in order to support multiple platforms, we extract the proper base libplctag DLL to a directory before importing it and wrapping those calls in our C# library. There's more information about this in main Readme. What it looks like is that you might have a Windows permission issue based on where it's extracting and how your app is running. That might be caused by your initial error or not... |
I appreciate the reply. I'm afraid I'm not well experienced with PLCs or Ethernet/IP communication and I understand if you don't have time to explain things that aren't related to your package. When I get the error: Am I correct in interpreting this as it failing to connect to the PLC or could this be that it did connect and didn't find the tag I specified? |
No, this issue is all related to the inability of the NativeImport to extract the appropriate libplctag core library properly. That error is saying that PInvoke can't find the C function in the native dll. To get around this issue, get a copy of the appropriate plctag.dll and configure ForceExtract to false. My guess is that an Antivirus program caused this by locking the file or something. |
Okay thank you that does bring some clarity for me. Could you point me in the right direction for getting a copy of the appropriate plctag.dll? |
You can download them from the libplctag releases page |
In terms of what this project could do to resolve this issue, I believe that #137 is key |
Hi just a quick question has anybody done a visual studio xamarin forms android phone project for CompactLogix plc |
I don't believe so, but it should be possible (maybe). Can you open a new issue and we can discuss in there? |
Yep it worked last time I checked as long as you follow the README. |
Hi I have read this file a few times my knowledge of c# and xamarin forms are limited as I am just starting to learn these.As I use mainly vb.net and my main strengths are plc programs I am getting lost on readme file. Many thanks
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: timyhac ***@***.***>
Sent: Thursday, March 3, 2022 10:00:02 AM
To: libplctag/libplctag.NET ***@***.***>
Cc: lakerty ***@***.***>; Comment ***@***.***>
Subject: Re: [libplctag/libplctag.NET] IOException: Sharing violation on path "..\plctag.dll" (#177)
Yep it worked last time I checked as long as you follow the README<https://github.com/libplctag/libplctag.NET#developing-for-systems-with-immutable-application-directories>.
—
Reply to this email directly, view it on GitHub<#177 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AK72AJIO5GVB3H3GN4YD2K3U6CESFANCNFSM457HEGCA>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Hello. I'm attempting to run code very similar to your example.cs to read and write to a boolean tag. However, when it is run I get this error: "IOException: Sharing violation on path C:\Users<user>\Desktop<project>\Assets\Plugins\plctag.dll"
I've been unable to understand the issue anymore through research.
Here is the callstack:
As mentioned above my code is very similar to example.cs. The variables used below are set elsewhere.
The notable outlying factor here is I'm attempting to use in Unity Engine.
Thank you for this tool and your help.
The text was updated successfully, but these errors were encountered: