Last post Nov 10, 2013 03:20 PM by email@example.com
Nov 06, 2013 07:43 AMfirstname.lastname@example.org|LINK
I have a console application that uss the zip 7z64.dll and it works fine. I now have a class library and I want to use the 7z64.dll as well. But when I build it into a Web Application
I get an exception: failed to load library. I found one article that said to put the directory into the environment Path. I did this and still got the error.
How do I solve this?
Nov 06, 2013 08:48 AM|Rion Williams|LINK
How are you currently adding the library into your project?
If you know what the name or location of the DDL that you need to add to your Project is, then you perform the following steps to add it as a Reference to your Project :
After adding it, you should be able to use a using statement to reference the classes available within your newly added namespace :
If you have NuGet installed within Visual Studio as well, you might also consider adding your reference through there by :
Nov 06, 2013 12:13 PMemail@example.com|LINK
I've already done this.
Nov 06, 2013 12:30 PM|Rion Williams|LINK
Could you post the code relating to how you are attempting to use some of the properties, methods or classes from the library itself? Or have you actually resolved the issue? (Did you try the NuGet approach?)
Nov 08, 2013 09:46 AM|Starain chen - MSFT|LINK
Please check the properies of the dll, please set the copy to output
to Copy Awalys.
Nov 10, 2013 03:20 PMfirstname.lastname@example.org|LINK
I solved it. You have to set the Platform target to Any CPU.
It won't work if the Platfom target is x86.