Picture of mitop
Registered 3 years 291 days
mitop Thursday, 16 September 2021, 10:10 AM
Upgrade Visual Studio App SDK from 13r1 to 13r2
Hi everybody,

yesterday we cleaned up our developer pbx, upgraded to version 13r2, upgraded the app platform to the latest version and all the apps. We had problems with the config class ( https://forum.innovaphone.com/moodle2/mod/forum/discuss.php?d=26909 ), so the idea was to bring everything to the latest version and see if it works. My problem now is:
How do I tell Visual Studio to use version 13r2? Our application was developed under 13r1, the project should now be built against the 13r2. In the VS SDK extension I couldn't find an option to do this and a hint in the docs was impossible to find in a hurry.
What is the best practice procedure when upgrading the SDK of an app under Visual Studio?
I can think of a few ways...
upgradeApps_SDK.png

Andreas Fink
Moderator Registered 13 years 52 days
Andreas Fink (innovaphone) Thursday, 23 September 2021, 11:00 AM
Re: Upgrade Visual Studio App SDK from 13r1 to 13r2
Hello Mladen,

usually if you open a solution after upgrading SDK on your PC, Visual Studio will ask you to update the SDK in the project to the current installed version (in this case V13r2).

You can also do it manually by using menu option "Tools > innovaphone SDK > Install / Update SDK..." in Visual Studio.

Best Regards
Andreas Fink
Picture of mitop
Registered 3 years 291 days
mitop Friday, 24 September 2021, 09:55 AM
Re: Upgrade Visual Studio App SDK from 13r1 to 13r2
Hello Andreas,

yes Visual Studio does an automatic upgrade of the SDK (hangs sometimes after the first start), but how to switch from 13r1 to 13r2???
Please see the attached file, there is no option to do it. Am i missing something?

Best regards
Mladen Topic

sdk_installer.png

Picture of Marc Schodermayr (innovaphone)
Moderator Registered 9 years 201 days
Marc Schodermayr (innovaphone) Friday, 24 September 2021, 10:10 AM in response to mitop
Re: Upgrade Visual Studio App SDK from 13r1 to 13r2
Unfortunately there is no easy way to upgrade your app from 13r1 to 13r2. But it also isn't that complicated. We're working on a howto at the moment to give a step-by-step instruction soon.

This is because of some structural changes between 13r1 SDK and 13r2 SDK. That said, changes are high to have an easier way to upgrade from 13r2 SDK to the next versions. So the "complicated" way will probably be necessary for 13r1 to 13r2 only.

Regards
Marc

Picture of mitop
Registered 3 years 291 days
mitop Friday, 24 September 2021, 10:55 AM
Re: Upgrade Visual Studio App SDK from 13r1 to 13r2
I already thought that it is not so easy sad (my first idea was simply to replace the sdk folder inside a solution with a sdk folder from a 13r2 solution, maybee the visual studio solution file needs some mod, and see if it builds).
It will be better to wait until the description is ready approve

Thank you very much
Regards
Mladen
Picture of mitop
Registered 3 years 291 days
mitop Wednesday, 3 November 2021, 05:21 PM in response to Marc Schodermayr (innovaphone)
Re: Upgrade Visual Studio App SDK from 13r1 to 13r2
Hi all,

this one works on my testproject:


Will do the same for our app tomorrow, think it will work too.

Build works, upload works, app starts...everthing seems to be all right.


Thank you
(Discovered by chance in the tutorials)
Picture of mitop
Registered 3 years 291 days
mitop Thursday, 4 November 2021, 01:53 PM
Re: Upgrade Visual Studio App SDK from 13r1 to 13r2
Hi again,

bringing our App to 13r2 seems to work, need to test the app functionality, but build etc. works. There are a few points that i would like to mention here:
  • The ending of our project file is vcxproj
  • I added following block in our vcxproj file after "<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">"
    • <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
      <PostBuildEvent>
      <Command>IF "%INNOVAPHONE-SDK-DEPLOY-APP%"=="YES" deploy-app --remoteMachine="$(RemoteTarget)" --appName=$(MSBuildProjectName) --appBinary="$(ProjectDir)arm-debug\repli\repli" --vsMode</Command>
      </PostBuildEvent>
      </ItemDefinitionGroup>
  • Following block was added after "<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">"
    • <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug (Visual GDB)|ARM64'" Label="Configuration">
      <ConfigurationType>Makefile</ConfigurationType>
      <UseDebugLibraries>true</UseDebugLibraries>
      </PropertyGroup>
  • We had to adjust our newapp.mak file inside ../newapp/newapp.mak
    • Had references to sdk/web1/... -> changed to web1/...
  • For building the project for ARM64, activate ARM64 for debug and release inside Visual Studios configuration manager
    • See attached picture

activate_arm64.PNG

Andreas Fink
Moderator Registered 13 years 52 days
Andreas Fink (innovaphone) Thursday, 4 November 2021, 07:52 PM
Re: Upgrade Visual Studio App SDK from 13r1 to 13r2
Hello Mladen,

thank you for your feedback. I will fix the tutorial.

> We had to adjust our newapp.mak file inside ../newapp/newapp.mak

Is it not covered in the chapter "Change main make file"?

Best Regards
Andreas Fink
Picture of mitop
Registered 3 years 291 days
mitop Friday, 5 November 2021, 05:24 PM
Re: Upgrade Visual Studio App SDK from 13r1 to 13r2
Hello Andreas,

the "Change main make file" chapter is all right, you wrote:
-> "Open the main make file of your project (the file yourapp.mak in the same directory as the vcproj file)"

The mak file i was talking about was the mak file inside folder (newapp) with the newapp.cpp, newapp.h, newapp_tasks.cpp, ..., files next to it. We had some more includes here (for example for the autocomplete functionality), which was also available under sdk/web1/... and had to be changed to web1/...

Best regards
Mladen Topic
Picture of mitop
Registered 3 years 291 days
mitop Tuesday, 16 November 2021, 12:06 PM in response to Andreas Fink (innovaphone)
Re: Upgrade Visual Studio App SDK from 13r1 to 13r2
Hello Andreas,

there is one step upgrading an App/SDK to 13r2 that is not clear to me nor documented. The Visual Studio shows that we are connected with our PBX and we are using SDK 13r1. How to switch these connections to 13r2?
Do i need to delete them and add new ones? I will try that.
pbx_con_r2_how.png

Picture of mitop
Registered 3 years 291 days
mitop Wednesday, 17 November 2021, 02:08 PM
Re: Upgrade Visual Studio App SDK from 13r1 to 13r2
Hello Andreas,

wanted to share my experience while updating the connections inside the connection manager. The following are the steps I took and the difficulties I encountered in the process.

1. Open the connection manager and go to the "App Platform Connections" tab
2. Select corresponding connection and press delete
2.1 Confirm the upcoming window, all remote connections will be lost (that is ok, we will add new ones - prepare your credentials for pbx and App platform)
3. I prefer to restart Visual Studio after that kind of change, but maybe i am wrong and it is not needed
3.1 After the restart, you will be prompted to select/create a new connection
3.2 Otherwise: Go to Extras -> innovaphone SDK -> Connection Manager and add a new connection
4. While adding the remote connection, select the same service name as before
4.1 The corresponding pbx object will be reused
5. During step 3 and 4 it can happen that Visual Studio gets stuck while trying to connect
5.1 In that case kill VS via Taskmanager and try again
6. After succesfull creation of the connection and clean/rebuild of your solution: When starting your app through Visual Studio/Debug Mode, you will recognize inside the Ap Manager, that your app is still on the old version
6.1 Stop debugging and start your app ones from the Ap Manager and the version number will switch
updated_r2.png

← You can define your color theme preference here