Taritsyn / LibSassHost

.NET wrapper around the LibSass library with the ability to support a virtual file system.
Apache License 2.0
82 stars 11 forks source link

On azure webapp getting "An attempt was made to load a program with an incorrect format" #44

Closed mksmanish79 closed 4 years ago

mksmanish79 commented 4 years ago

I am trying to use LibSassHost in DotNetNuke cms and so far it's going good but when I host the code on azure webapp i am getting the below error.

I am using the latest version 1.3.1 and its working on my local and some other servers but not working on azure webapp.

Message :During loading of Sass compiler error has occurred. See the original error message: “An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)”. StackTrace : at LibSassHost.SassCompiler.Initialize() at LibSassHost.SassCompiler.InnerCompile(String content, Boolean indentedSyntax, String inputPath, String outputPath, String sourceMapPath, CompilationOptions options) at LibSassHost.SassCompiler.Compile(String content, String inputPath, String outputPath, String sourceMapPath, CompilationOptions options) at UXManager.Extensions.Apps.ThemeBuilder.Managers.ThemeManager.ProcessScss() at UXManager.Extensions.Apps.ThemeBuilder.Controllers.SettingsController.Save(String Guid, ThemeEditorData Data)

InnerMessage :An attempt was made to load a program with an incorrect format.(Exception from HRESULT: 0x8007000B)

InnerStackTrace : at LibSassHost.Internal.Native.Sass_Api.libsass_version() at LibSassHost.SassCompiler.Initialize()

Taritsyn commented 4 years ago

Hello, Manish!

Typically, this error occurs when the bitness of process and native assembly loaded into it does not match.

In this case, this error is caused by incorrect deployment of the libsass.dll assembly. One of the libsass.dll assemblies is located one level above of the x86 and x64 subdirectories.

mksmanish79 commented 4 years ago

Will try this and let you know.

Thanks for the quick response.