Open cocomalully opened 11 years ago
Hello, you don’t need to add any dlls as a references. They must be copied to the directory where the compiled .exe of your program resides.
If you’ve added the Pechkin’s projects to your solution and refeced them, then they will be copied automtically.
If you’ve included Pechkin’s source into your project,put those .dlls into the root of your project (Right click on a project in solution explorer window->Add->Existing files) and in properties for each of the file (F4 while having the file selected in solution explorer) set the property Copy To Output Directory to Copy If Newer.
Thanks a lot. I create another project to do what you told me, but there is still the same dll that the program cannot find, which is the same one for the above issue, and here is the error message, Unable to load DLL 'wkhtmltox0.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E). Like you said, I copied wkhtmltox0.dll to the directory where the compiled .exe of my program resides just like the other dlls, but this one does not work. Any idea? Thanks again.
it's the PechkinStatic.InitLib(false); from SimplePechkin.cs that causes the exception.
what i'm doing is to add all necessary Pechkin classes and others into one Class Library or dll file so that i can use it in my own project easily. and the wkhtmltox0.dll file cannot be found when i run the program. i tried to add that dll as a reference, and it says, A reference to C:...\wkhtmltox0.dll could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component. i tried to add that dll as an existing item to my project, and it still cannot be found, error message, Unable to load DLL 'wkhtmltox0.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E). i tried to copy that dll to the folder of the directory where the compiled .exe of your program resides, bin folder, and debug folder. but all of them do not work and show same error. Do you have any idea? or just tell me what's the final suggestion of you, Thanks.
cocomalully, you need to copy all 5 of those extra 'gibberish' looking dlls to the main exe folder. The way I did this is by setting a post-build script on my project that referenced Pechkin so after building, those dlls would be copied to the right place automatically.
Example, put this in your post-build for the project that references Pechkin and the dlls:
start xcopy /Y "$(TargetDir).dll" "$(SolutionDir)ProjectName\Bin\";
Replace 'ProjectName' with the name of your startup project.
Hi, Just want to use your program to convert html to pdf. When I try to add wkhtmltox0.dll as a reference my solution, it shows the error that, A reference to C:...\wkhtmltox0.dll could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component. Try to google the solu, but no luck, so need your help here. Thanks.