Quantcast
Channel: Javascript .NET
Viewing all articles
Browse latest Browse all 137

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

$
0
0
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"));
            }
}

Viewing all articles
Browse latest Browse all 137

Latest Images

Trending Articles

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>