问题
I am getting this error when I bring up the website from within Visual Studio 2013. LibSass.x64.dll & libsassnet.dll are in the bin folder.
Could not load file or assembly 'LibSass.x64' or one of its dependencies
回答1:
It is a known issue with libsassnet. Basically you need correct library referenced, either 32 bit or 64 bit. In our project we reference 64 bit and thus project needs to be compiled and run in 64 bit environment. By default IIS Express runs in 32 bit (since VS.NET runs in 32) so that is why you get an exception.
Better create an IIS site and run it using it or you can modify nuget reference of libsassnet to 32 bit version.
PS: we resolved that automatically in azure deployment, but still working with libsassnet developers to resolve it when it is deployed locally.
回答2:
You can switch to 64 bit IIS Express in Visual Studio settings:
Tools > Options > Projects and Solutions > Web Projects > Use the 64 bit version of IIS Express for web sites and projects.
Update: If you get this error on a clean Windows machine, you have to install Visual C++ Redistributable Packages for Visual Studio 2013.
I recommend to install both x86 and x64 packages.
回答3:
Looks like the latest version requires the VC++ 2015 version: https://www.microsoft.com/en-us/download/details.aspx?id=48145
来源:https://stackoverflow.com/questions/29643490/could-not-load-file-or-assembly-libsass-x64-or-one-of-its-dependencies-in-virt