Picture of Wim 4127
Registered 6 years 186 days
Wim 4127 Wednesday, 6 September 2023, 10:32 AM
Urgent: Latest SDK Visual Studio Plugin does not work with latest version of Visual Studio 2019, debugging no longer possible
Hi, I have an urgent request.

I upgraded the SDK installation on my PC to the latest, and currently installed the visual studio community 2019 extension with version 2.0.42.0.

When starting up, it generates the error in a message box:
---------------------------
Microsoft Visual Studio
---------------------------
innovaphone SDK - ERROR

Object reference not set to an instance of an object.
---------------------------
OK
---------------------------

The innovaphone output in visual studio generates following logs:

[09-06 10:27:02.225] innovaphone SDK Visual Studio Package v2.0.42.0
[09-06 10:27:02.225] copyright (c) 2020-2021 innovaphone AG

[09-06 10:27:02.225] Initializing...
[09-06 10:27:02.812] Detected: Visual Studio Community 2019 (16.11.29)
[09-06 10:27:02.910] assembly liblinux initialized (v4.0.30319 for Visual Studio v16.10 and newer)
[09-06 10:27:02.910] innovaphone SDK extension initialized successfully.
[09-06 10:27:02.930] Scanning solution for App Platform projects...
[09-06 10:27:02.935] Project: SnomProvisioningApp => [09-06 10:27:02.982] 1 innovaphone App Platform projects found
[09-06 10:27:02.990] Checking projects for the need of install / update innovaphone SDK...
[09-06 10:27:02.990] Checking project SnomProvisioningApp => [09-06 10:27:02.994] ERROR: Object reference not set to an instance of an object.


Please advise on how to solve this since it prevents the upload of the code when debugging applications (amongst other things that we need the plugin for).

Is there an option/way to install an older version of the visual studio plugin. Before the upgrade of the SDK to the latest version I did not had this issue...

Andreas Fink
Moderator Registered 12 years 351 days
Andreas Fink (innovaphone) Wednesday, 6 September 2023, 03:12 PM
Re: Urgent: Latest SDK Visual Studio Plugin does not work with latest version of Visual Studio 2019, debugging no longer possible
Hello Wim,

could you try to remove all SDK related files from the project folder and start VS again?

  • Close Visual Studio (kill all devenv.exe processes).
  • Remove SDK folders from the project folder (see this .gitignore for reference https://github.com/innovaphone/cppmoreexample/blob/master/.gitignore )
  • Start VS and open the solution - it should ask for installing the SDK files (select SDK version that matches your project, 13r2 or 13r3).

Let us try this first.

Best Regards
Andreas Fink
Picture of Wim 4127
Registered 6 years 186 days
Wim 4127 Thursday, 7 September 2023, 11:09 AM
Re: Urgent: Latest SDK Visual Studio Plugin does not work with latest version of Visual Studio 2019, debugging no longer possible
Hi Andreas, unfortunately that didn't help. I removed all the files that you mentioned and all the folders of the SDK. But it just show the same message box and error. Error output log is also exactly the same. As such, I also can not use the plugin to install/copy the SDK files.

Do you perhaps have an older version of the plugin that I can install seperatly?
Andreas Fink
Moderator Registered 12 years 351 days
Andreas Fink (innovaphone) Thursday, 7 September 2023, 02:07 PM
Re: Urgent: Latest SDK Visual Studio Plugin does not work with latest version of Visual Studio 2019, debugging no longer possible
Hi Wim,

this is the only version we have.

This error seems to happen right before current installed SDK version is checked.

I could imagine, uninstalling the SDK and Visual Studio Plagin and installing it from scratch could help.

Best Regards
Andreas Fink

P.S. other possibility is to wait until next week, when we can consult the responsible developer
Picture of Wim 4127
Registered 6 years 186 days
Wim 4127 Friday, 8 September 2023, 11:09 AM
Re: Urgent: Latest SDK Visual Studio Plugin does not work with latest version of Visual Studio 2019, debugging no longer possible
Hi Andreas,

I unstalled and re-installed the whole thing from scratch, but no change, and the exception still occurs. Could you please check on monday with the developer... this is currently blocking my development for a few customers. If needed, you can contact me directly via email and I can share my screen if he wants to do some investigaten. You have my e-amail address.

Kr,

Wim
Picture of Marc Schodermayr (innovaphone)
Moderator Registered 9 years 135 days
Marc Schodermayr (innovaphone) Monday, 11 September 2023, 05:55 PM
Re: Urgent: Latest SDK Visual Studio Plugin does not work with latest version of Visual Studio 2019, debugging no longer possible
So I digged into the code if the Visual Studio Extension. Getting an exception at this point is a bit strange, but I came down to the following options:#

  • Can you please verify, that the environment variable INNOVAPHONE-SDK ist set
  • Can you please verify, that file %INNOVAPHONE-SDK%\setup\com.innovaphone.sdk.setup.json exists?
  • Inside your project, there should be a file sdk.version (it should be located inside of the common folder (probably <project-dir>\<project-name>\common)
So if that file exists, may I ask you to post them here so that I can check the content, please?

Also please consider that the fact the environment variable exists, doesn't mean that Visual Studio knows it. Yout might need to close all Visual Studio instances and open it again.

Regards,
Marc

Picture of Wim 4127
Registered 6 years 186 days
Wim 4127 Wednesday, 13 September 2023, 08:45 AM
Re: Urgent: Latest SDK Visual Studio Plugin does not work with latest version of Visual Studio 2019, debugging no longer possible
Hi,

the environment variable is set, the content of the json file is attached to this ticket.

the sdk.version file is missing in the common folder. But, I can also not find it in the c:\innovaphone\sdk installation directory in the corresponding common folder. Could it be that this file is missing in the latest release, and, if that is copied then to the project this file is also missing? Or is this file created when you use the visual studio extension (I assume this is not the case if the extension cannot start with it).

In the meantime, we have a custom procedure to update the app on the remote machines and debug them, without the need for the plugin. It allows us also to have multiple versions/build of the app on those systems with different names and allows us to work in latest version of Visual Studio (2022) which works better with intellisense (and also co-pilot can be used then). So for the time being, this issue is no longer critical for use but it might be others have the sam issue after upgrading the SDK

com.innovaphone.sdk.setup.json
Picture of Marc Schodermayr (innovaphone)
Moderator Registered 9 years 135 days
Marc Schodermayr (innovaphone) Wednesday, 13 September 2023, 03:19 PM
Re: Urgent: Latest SDK Visual Studio Plugin does not work with latest version of Visual Studio 2019, debugging no longer possible
Well, the missing sdk.version file may be a problem. I can't reproduce it, but we can give it a try. Just create that file (as already said: <project-name>\<project-name>\common\sdk.version) with the following content:

{ "sdk" : "13r3", "version" : "137877" }

You can insert a lower version like 130000 to force visual studio to update the SDK.

Let me know if it helps.

Best regards,
Marc

Picture of Wim 4127
Registered 6 years 186 days
Wim 4127 Wednesday, 11 October 2023, 11:03 AM
Re: Urgent: Latest SDK Visual Studio Plugin does not work with latest version of Visual Studio 2019, debugging no longer possible
Hi Marc, I did not have the time to test this since we no longer work with the VS plugin. We created our own procedure which does not require the plugin to be installed and gives us more flexibility in app naming. Also, we can run this in VS2022.
← You can define your color theme preference here