chinprarat Posted October 3, 2017 Report Share Posted October 3, 2017 I got an Error when start debugging as picture due to i have to set Target Framework to be .net4 because I created the project on Visual studio 2015 which required .Net4 for some .dll file but for the Unitronics.ComDriver still old .net I have try to set AnyCPU at TargetCPU but the error still remains Can anyone help me how to fix it as the picture below? Link to comment Share on other sites More sharing options...
Saragani Posted October 3, 2017 Report Share Posted October 3, 2017 The .Net Communication driver is compiled as x86, so don't use Any CPU and x64 platform. Link to comment Share on other sites More sharing options...
chinprarat Posted October 3, 2017 Author Report Share Posted October 3, 2017 Thank you for your suggestion! You are right but after i do it so I can't built the project because the error occurred from the other .dll file. That is CANbus dll file, Looks like they prefer the Target CPU to be X64 or AnyCPU. I have .Net2 and .Net4 for the CANbus dll file but when I use .Net2 in this project the system said can't mix .net differ version. Do you have any idea to fix this? Link to comment Share on other sites More sharing options...
Saragani Posted October 3, 2017 Report Share Posted October 3, 2017 Yes, you can take the source code of the .Net communication driver from Unitronics website: https://unitronicsplc.com/Download/SoftwareUtilities/NET Driver 2015 - Q4.zip Then, add the project to your solution, and add a reference to the project instead of the compiled dll. Changed the project platform to Any CPU or x64 (or whatever you want or need), compile and run. Link to comment Share on other sites More sharing options...
chinprarat Posted October 3, 2017 Author Report Share Posted October 3, 2017 That's good idea! A lot of change but it works now. Thanks a lot Saragani Link to comment Share on other sites More sharing options...
oferb Posted June 8, 2018 Report Share Posted June 8, 2018 The question is do you have a 64 bit com dll? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now