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 .scss
files to CSS.
The problem is that the handler throws the following arcane InvalidOperationException
:
Found NSass.Wrapper.proxy.dll which cannot exist. Must instead have NSass.Wrapper.x86.dll and NSass.Wrapper.x64.dll. Check your build settings.
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 BadImageFormatException
maybe due to IIS Express being 32-bit which I've seen being a PITA with Oracle dependencies - I gave up then, too.