Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

.NET SDK : basic 1st test is not working : System.core error ?

Hello,

I have created a little script to refresh an app on my local computer, in order to start with this SDK.

I have the framework 4.5.2, and  last version of QlikSense and the Qliksense SDK 13.2.0.

Initially I also downloaded the latest autofac 4.6.2 and latest newtonsoft.json librairies (v10)

but I had errors of assembly not found (v6 for json and 3.5 for autofac), so I was obliged to downoad  the requested versions...

Strange, no ? First question is why I had these errors ? I expected that all was OK if I download the latest packages and dependancies no ?

After installing the old json and autofac dlls,  I was able to continue, but now I have again an error on another assembly not found, but this time on System.core ?

When I call the function :

IAppIdentifier foundAppIdentifier = location.AppWithNameOrDefault("My App");

  Impossible de charger le fichier ou l'assembly 'System.Core, Version=2.0.5.0, Culture=neutral,

PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' ou une de ses dépendances. Le fichier spécifié est introuvable.»


Indeed I have another newer version for System.core. So what I would have to do to fix that ?  Is it normal while I have downloaded all latest files ?

Any help would be really appreciated

4 Replies
Not applicable
Author

Seems there is a link with autofac.dll :

Portable Class Library Answers

I have tried to apply the patch KB24668871 but seems it is not applicable to my system, because already up to date.

Not applicable
Author

Hello,

any chance to be helped ?

Thank you in advance

mow
Employee
Employee

Hi Laurent,

To me it sounds like there are old references lingering in your .csproj file, can you check your project file to see which versions of the references it states? Also verify that you project targets the 4.5.2 .NET framework.

The QlikSense SDK should only requires Autofac >= 3.5.2 and Newtonsoft >= 6.0.8, and if they are not already present in a project they will automatically be installed.

Regards,

Mattias

Not applicable
Author

I have not given all information actually (because for  to me this has nothing to do with visual studio)

The situation is a little bit more complex :

I have NOT Visual studio.

I expected to be able to drive Qlik via Powershell only.

I wanted to basically create a powershell script that refresh a (local for now) qvf file

So I execute a Powershell script that :

   - load dynamically the Qlik/autofac/Json dlls with instruction [Reflection.Assembly]::LoadFile

   - drive Qlikview  by powershell.

     Following instructions are correctly executed :

            $local = [Qlik.Engine.Location]::FromUri([System.Uri]"ws://127.0.0.1:4848")

            $local::AsDirectConnectionToPersonalEdition

But, crash at this instruction:

[Qlik.Engine.IAppIdentifier]$foundAppIdentifier =[Qlik.Engine.LocationExtensions]::AppWithNameOrDefault($local,"test").DoReload()

Error :

  Impossible de charger le fichier ou l'assembly 'System.Core, Version=2.0.5.0, Culture=neutral,

PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' ou une de ses dépendances. Le fichier spécifié est introuvable.»


So , I'm stuck.

How could I load or install the dll of Qlik/autofac/json ?

Loaded them dynamically seems  not a good practice in this case ?

Am I obliged to develop the tool (C# lib) under Visual Studio ?

Any advice would be appreciated.

NB: There would be 2 other possible options:

  - Create a c# file that do the reolad, and execute this .cs via Powershell.

    But it is not working, because dlls (qlik,autofac, json) are not installed/not found. Not sure how I could load them.

  - Use Visual Studio, with  the standard way, and create an executable with 1 parameter (the file to be reloaded). But I have not VS currently, and I expected to be able to drive Qlik via powershell