locked
Need help installing TidyMangaed please RRS feed

  • Question

  • User-2145974911 posted

    I installed the TidyManaged NuGet package and wrote some basic code to convert an HTML file to XHTML but when I run it I get the following error:

    An unhandled exception of type 'System.DllNotFoundException' occurred > in TidyManaged.dll > > Additional information: Unable to load DLL 'libtidy.dll': The > specified module could not be found. (Exception from HRESULT: > 0x8007007E)

    I tried to add a reference to ibtidy.dll (both x64 and x86) that the GitHub page for TidyManaged link to but that gives the error:

    libtidy.dll  could not be added. please make sure the file is accessible and that is a valid assembly or COM component.

    Every other NuGet package I have ever used has always just worked, what do I have to do to get this NuGet package working so I can use TidyManaged?

    Friday, October 16, 2015 10:05 AM

All replies

  • User614698185 posted

    Hi Eagle_f90,

    libtidy.dll  could not be added. please make sure the file is accessible and that is a valid assembly or COM component.

    libtidy.dll is an unmanaged C DLL, so you can't add a reference to it in Visual Studio's Add Reference dialog. You need to build the C# code from https://github.com/markbeaton/TidyManaged into a managed DLL, and add a reference to that DLL instead.

    Make sure that libtidy.dll is copied to your output folder; you can achieve this by adding the DLL file to your project, and changing its properties to "Copy to Output".

    Best Regards,

    Candice Zhou

    Monday, October 19, 2015 9:59 PM