we started building a little library to get the version-no. from our qlik sense server. We wrote it into a dll because we want to connect Microsoft Dynamics NAV and Qlik Sense Server. As far I know you can call .NET-Libs from NAV (tested and it's working) but for some reason, I don't get, we can't call our connector-DLL, here's the code:
public class Net2QlikConnector
string myHost = "http://ourserver.ourdomain.ourtld";
public string Initialize()
Uri absolutURI = new Uri(myHost);
myLocation = Qlik.Engine.Location.FromUri(absolutURI);
myLocation.AsNtlmUserViaProxy(false); //<- this function might cause the crash
string tempServerVersionNo = myLocation.Hub().ProductVersion();
catch (Exception e)
We commented out every line -> AsNtlmUserViaProxy or Autofac.dll might cause these crashes, or do you have a suggestion how to work around?
When we call this library in MS Dynamics NAV 2016 or 2017 we get an error that some file is not found which includes the system.core data from the .NET-Framework:
Which would be the following in english:
Error calling net2qlik.Net2QlikConnector.Initialize with the following message:
Could not find file or assembly "System.Core, Version=188.8.131.52, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes" or one of its dependencies.
Problem here is that we're using .NET Framework v4.5.1+ (as in the documentation recommended) but autofac or the dlls included by this functions throws us errors from old framework versions. We, f.e., have a System.Core.dll which is Version 184.108.40.206 so we can't find the error.
The DLL is x86 Visual Studio compiled only static references to the qlik-api which I included using the nuget-manager.
I can call the dll from a different .NET-App which works as I expected only Dynamics NAV causes me this troubles.
Does anyone know what to do or what I've been doing wrong?
Well yes I could. But for example I don't know if they will help me building a simple connector between qlik and nav when they sell this kind of product.
I hope we have someone here facing the same problems as I do.
copy the mscorlib.dll (version 2.0.50727.8009), System.Core.dll (version 2.0.3.0523.6) and System.dll (version 2.0.3.0523.6) in
%TEMP%\Microsoft Dynamics NAV\Add-Ins.
This will solve your problem, since the dlls will be loaded by Dynamics NAV in the assembly cache.
We already tried this multiple times without an working result. We changed DLLs we've added them we replaced them with old ones etc.
What we didn't try was replacing mscorlib, system.core AND system.dll but we've troubles finding the System.Core.dll in version 2.0.3.0523.6 and a System.dll in version 2.0.3.0523.6.