-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not load file or assembly 'LibSassHost.Native-32' or one of its dependencies. An attempt was made to load a program with an incorrect format. #3
Comments
Hello, Jonathan! It seems, that the LibSass Host does not load one of the Visual C++ Redistributable 2013 assemblies. How did you installed the Visual C++ Redistributable Packages for Visual Studio 2013: via installer or locally in |
Via the installer. I noticed that locally the LibSassHost.Native-32.dll and LibSassHost.Native-64.dll are in a subfolder in bin but on remote they are in the bin folder. When I replicate this structure I get a different error. The flattening of the structure seems to occur during msbuild publish when it uses the _CopyWebApplicationLegacy Target when publishing the website
Not sure if it really makes a difference or not |
Here is the other error I mentioned https://gist.github.com/JonCubed/47f071af5cfb56286a0e#file-stacktrace-libsasshost-2 |
This leads to error. You must restore the original folder structure.
This error has no relation to my library. |
fair enough
If you continue down the stack trace there is an error with LibSassHost
|
I've seen that is on the bottom of stack. I just used wrong words, because all that is before line 31 is simply bewildering. I think, that can close this issue, because it is a deployment error. |
@Taritsyn, I've got the same problem. Story is short: I've decided to update I can't believe this is deployment issue because it tries to load 32-bit dll into 64-bit Could you please help me figure out, what's going on? |
Hello, Nikolay! Try to restart IIS, and then reinstall LibSassHost. |
@Taritsyn, I'm not sure what you mean by "reinstall LibSassHost", but I've tried many times, the most hard-core was to:
with no luck. |
Reinstall via NuGet. |
Finally figured it out. Started to work after I disabled Glimpse HTTP module. Very strange. Thanks, @Taritsyn! |
This error happens when you publish a website with MSBuild outside of VisualStudio. I am investigating if the nuget is built properly because these files are in Content folder. |
I was having exactly the same problem. Worked fine locally, but on the server wasn't working at all. Installed the latest C++ Redistributable then an IIS reset solved the problem. |
@Section9Code During publishing of native assemblies, you must always reset IIS. I recommend you to read the “File lock on LibSassHost.Native-64.dll” discussion. |
Hello! Since version 1.2.6 the MSVC runtime was embedded into the native assemblies for Windows. Now you do not need to install the Microsoft Visual C++ Redistributable. |
It is working locally for me but when I try to run in on a remote server it fails with this stack trace. I have the visual c++ redistributable 2013 installed (x86 & x64) on the remote server, it looks to me like it is trying to use 32-bit version instead of 64-bit.
The text was updated successfully, but these errors were encountered: