Luke Puplett Luke Puplett - 2 months ago 4x
Sass (Sass) Question

Error using NSass

I've setup NSass from NuGet. It's a managed wrapper around libsass and has a HTTP handler that does on-the-fly compilation of

files to CSS.

The problem is that the handler throws the following arcane

Found NSass.Wrapper.proxy.dll which cannot exist. Must instead have
NSass.Wrapper.x86.dll and NSass.Wrapper.x64.dll. Check your build

I can see that the code and message is copy-pasted from some trickery found here (see bottom):

Load x64 or a x86 DLL depending upon the platform?

So my guess was that my web project needed to target x64 specifically, maybe to force a decision on the unmanaged library being used.

That just ends with a
maybe due to IIS Express being 32-bit which I've seen being a PITA with Oracle dependencies - I gave up then, too.


I think, due to the unmanaged library, AnyCpu cannot be used for the project, instead you must pick a target processing platform.

For me that's 64-bit but IIS Express is a 32-bit process. I recall having similar issues with unmanaged references, bitness and IIS Express (32) vs. production (64) with Oracle libraries.

So when IIS Express tries to load the x64-targeted website assembly, it blows up.

I am now looking into a compile time CSS compilation, rather than runtime, using Web Workbench or something.