Closed ad0ran closed 8 years ago
Most likely you are building against "Any CPU" which causes the build to be x64, and you have installed the x86 versions of the package. Please install LibSassNet x64
Install-Package libsassnet.Web.x64
Install-Package libsassnet.x64
I tried rebuilding against the x86 Platform Target, still experiencing the same issue
After installing the x64 packages, i start to receive this error:
Could not load file or assembly 'LibSass.x64' or one of its dependencies. An attempt was made to load a program with an incorrect format.
are you building against X64 after you installed the X64 packages?
Yes
I also have Microsoft Visual C++ 2013 Redistributable installed as well. (also 2008 - 2012)
Same problem here... I have tried reinstalling the Visual Studio 2013 C++ Redistribution packages and have had no joy. If I go to : Tools > Options > Projects and Solutions > Web Projects and un-check 'Use the 64bit version of IIS Express' it builds the site in 32bit and finds the 32bit dll fine, but I need it to build as 64bit.
@ad0ran @treefishuk Could you try installing a bit older version of the packages ? 1,2 or 3 versions back and report the results?
I installed libsassnet.web 1.1.0 and build against x86 platform, still receiving the same issue.
are you runnign IIS or IIS Express?
IIS Express
try IIS proper running as local system
I enabled local IIS and published to filesystem. I then setup the my local iis bindings, but still the same issue. i created a repository for the project i'm working on, you can view my source here: https://github.com/ad0ran/AngularJS
@ad0ran
project > properties > web > "use local iis" > create virtual directory > ctrl+s
(just in case make your project run as x64
in bundleconfig.cs
change to bundles.Add(new SassBundle("~/bundles/css/bootstrap").Include("~/sass/bootstrap.scss"));
and remove the web compiler thingy that also compiles scss to css to avoid conflicts
@aviatrix
Hi yes, I changed the virtual directory to point to the web project instead of the published source. I've also installed the x64 packages and have compiled towards the x64 platform. I'm not receiving anymore runtime errors, but loading the web page takes unusually longer now.
@ad0ran sometimes you will have to restart IIS , cmd as administrator > iisreset
if it takes more than ~30 seconds, do a reset. it's a known issue that we haven't quite been able to fix yet
@treefishuk ping, please read above :)
@aviatrix
I see, alright thanks for your help. Keep up the good work!
I am using visual studio 2017 version 15.7.3 and using both the 64 and 86 dll versions. I have tried all the solutions mentioned above but same is not working for me. I am using libsasshost version 1.1.9.0 and getting the below error: 'Unable to load DLL 'libsass': Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))'
I have an asp.net web project and have installed the following packages:
libsassnet v3.2.5.1 libsassnet.Web v2.1.3.1
I also have my bundles configured like so: bundles.Add(new SassBundle("~/bundles/sass/bootstrap").Include("~/sass/bootstrap.scss"));
When I compile the project, I see that the LibSass.x86.dll is located in my bin folder, so I am unsure of why it's unable to load the assembly.