Could not load file or assembly 'Noesis.Javascript.dll' or one of its dependencies.

Apr 25, 2013 at 9:12 AM
Hi to all,

I develop an ASP.NET MVC 4 application which using Noesis.Javascript.dll assembly. The web-application is hosted under Windows 2003 32 bit, IIS 6. When I starting the application the following error is occured: "Could not load file or assembly 'Noesis.Javascript.dll' or one of its dependencies. The specified module could not be found." I use "Any CPU" platform target to build the application. I check the "bin" directory after build routine - it contains a 32 bit version of the Noesis.Javascript.dll assembly, msvcp100.dll and msvcr100.dll. Could somebody explain me what the problem is?
Apr 25, 2013 at 1:20 PM
I've found the solution: msvcp100.dll and msvcr100.dll libraries have to be placed to %system32% directory instead of the "bin" directory of the application
Jan 2, 2014 at 8:58 PM
I had these two files in my %system32% directory, and I still got the error listed above. The problem ended up being that I was running on x64 and I didn't compile the console app I was building as specifically targeting x64. Using Any CPU was not sufficient.
Feb 18, 2014 at 3:45 PM
Edited Feb 18, 2014 at 3:48 PM
If you don't want to put those DLLs in SYS32 on the server for whatever reason (ours was for massive deployment) you can use the following modification in your Global.asax, and then put your unmanaged DLLs in an "unmanaged" folder inside bin. 64 bit dllls should go under x64 in that unmanaged folder. The + are plus signs. Not sure why they are being encoded.
static MvcApplication()
        {
if (IntPtr.Size == 4)
            {
                // 32-bit
                System.Environment.SetEnvironmentVariable("Path", HostingEnvironment.ApplicationPhysicalPath + "bin/unmanaged;" + System.Environment.GetEnvironmentVariable("Path"));
            }
            else if (IntPtr.Size == 8)
            {
                // 64-bit
                System.Environment.SetEnvironmentVariable("Path", HostingEnvironment.ApplicationPhysicalPath + "bin/unmanaged/x64;" + System.Environment.GetEnvironmentVariable("Path"));
            }
}