Pelco Developer Network (PDN)

Pelco SDK not found or msvcp120d.dll not found

Hi Chris,

I am trying to run my C# application on my server computer using Release Mode. But each time I will face "Pelco.SDK.dll not found". After browsing through various online articles, I realized that I had to change the environment variable path to /api/libs/release. But after this I received "msvcp120d.dll is missing from your computer". I have installed the .Net framework 4.5.1 and both x64 and x86 version of Microsoft Visual C++ Redistributable package on my server computer. Am I missing anymore libraries for Pelco or is this purely a MS visual studio error?

Thanks and Best Regards

Hi there -

It sounds like you're still linking to the debug version of Pelco.SDK.dll in the C# project. You can change the mode in Visual Studio to release, and you have correctly identified the environment variable PATH string that needs to be changed from /debug to /release.

I believe that you're still linking to the debug version of Pelco.SDK.dll in the project because it is asking for msvcp120d.dll - that "d" at the end is for the debug version of that dll that isn't normally installed when you install C++ Redist packages. The only way to get that debug version of msvcp120.dll is to install visual studio or a similar IDE that would include it. Since you're deploying a solution, you'll want to use the release versions.

Basically there are 3 things to check:
1. Release build mode in Visual Studio
2. Release DLL is being used in the project
3. Release string is used in environment variable PATH

It sounds like you've correctly done 2 out of 3. Check that DLL that is being used in the project and I bet that's the problem.

I still have this issue

Hi Chris, I did exactly as you suggested. But I still got the following exception,

System.IO.FileNotFoundException was unhandled
Message: An unhandled exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
Additional information: Could not load file or assembly 'Pelco.SDK.dll' or one of its dependencies. The specified module could not be found.

I am using VS2015, not sure whether this is the issue. Hope you can help. Thanks

What version of Pelco SDK are you trying to use?

Please run depends.exe to investigate the dependencies of the Pelco.SDK.dll file that you are attempting to use. Something in your system is missing or not being found when you try to use. It might be a mis-match between release and debug, as we discussed before, or something else that is missing in your environment.

Resolved

Thanks, Chris!

I download PelcoSDK-Redistributable-4.2.1-15974.vc12.exe and used the dll file from here. The issue is resolved. So it's the dll issue.

Gotcha - thank you for the update! I'm glad it is all working now.

Yep, the problem was at the DLL. For some reason it was referencing towards the DEBUG version of the DLL. I had to delete everything in bin folder and rebuild it to get it to work. Thanks Chris.

Best Regards

Sure thing - glad to help and glad to hear that it's working for you now.