Closed yesyesuk closed 6 years ago
Hmmm, I'm a bit confused (and not experienced with this) When I load the OpenZWave.dll into dotPeek it says it is for .NET 4.0. but (one of) my own DLLs from my application is for .NET 4.5.2
Was it a mistake to change my application to .NET 4.5.2?
Interesting... I have now installed Visual Studio 2015 Community on my server and now I don't get that exception any more. I would really like to find out what the cause of that is as it is not very practical to install VS on every machine my software needs to run on. Any ideas?
AnyCPU is not supported. That would mean it'll run as x64 on your PC and the library is only available as a 32bit dll. Please compile specifically for x86 and it should work.
oh just saw your follow-up question. I'm guessing it's because you are missing the VCLibs dependency. When installing Visual Studio, that'll get installed too, or you can just install those by themselves. Good point! I hadn't thought about that.
Ah, OK, that makes sense considering that this wrapper is C++ , not C# (I didn't know that but recenlty read it here in another issue).
So, in addition to the .NET 4.5.2 Framework, is this what I need? https://www.microsoft.com/en-gb/download/details.aspx?id=48145
@yesyesuk Yup that should be it.
I have an issue here that I could use a bit of help with. I'm using this wrapper in my home automation app to support Z-Wave devices in addition to my own hardware.
It all works fine on the computer I'm developing on. But now I want to use that app on my home automation server but I get an exception saying that OpenZWave.dll could not be loaded.
The part of my app that is using OpenZWave.dll is itself a DLL file. Not sure that is relevant because it works fine on my development machine.
This is the exception I get (from my app log)
Both machines are running Windows 7 x64. I use Visual Studio 2015 Community. The target framework in the app and all its DLLs is set to .NET 4.5.2 and I compile for x86. I installed this wrapper using Nuget. Before I started using ZWave the app was .NET 4.0 and Any CPU. I installed .NET 4.5.2 Runtime on the "server" before trying to run the new version of my app with ZWave.
When I copy the folder where my app is in from the server back to a new folder on my development machine, it works. So I assume all the necessary files are there.
It looks like there is something installed on my development machine that is not present on the "server". How can I find out what that is?