Migration From 4.x to 5.x

Migration Partner Kit from framework version 4.x to 5.x

  

  •  Migration method: 1  

  1. Download Latest Partner kit from Source Forge. Click here to download partner kit 

  2. Open project in Visual Studio 2019, and select ViennaAdvantageWeb as Startup project. 

  3. This Partner kit will have reference of all the required libraries and required packages. 

  4. Rename Assemblies of new Partner kit. Please refer to Rename assembly 

  5.  Copy code from existing Partner kit to new Partner kit. 

  6. Start using new partner kit. 

 

NOTE : User can also find the latest versions of referred libraries used in partner kit from the FTP details shared below. 

IP:- betaftp.viennasolutions.com

UserID : Vienna 

Protocol:- SFTP 

Port:- 22 

Password :  (Contact to Vienna Support team) 

This is straight forward and shorter approach to update your code. 

Note: New Partner kit will be compatible with Vienna Advantage Framework 5.0.1.0 and above version. If your application still uses Vienna Advantage Framework version 4.X.X.X, then please do not use new Partner kit. 

  

  •  Migration method: 2   

In this method, one has to upgrade existing setup and projects with new references, target framework, packages and configurations. For this, one has to follow below steps. 

  1.  Target Framework 4.8  

Open module and partner kit project solution.  Right click on a project in solution and click on ‘properties’ from context menu option, then select Application tab and change target framework to 4.8. Repeat for all three projects in the solution. 

 

Note: If .NET Framework 4.8 option is not available, Install framework 4.8 (developer pack) from Microsoft site on your development machine. 

  

  1. NuGet-Packages 

Vienna has upgraded NuGet packages in Core projects. So, all existing projects must use same packages for smooth operations of application. Start with ViennaAdvantageWeb project. Install specific version from NuGet package console or NuGet Package manager UI. Following is the Package list with Version.   

  • Newtonsoft.Json 13.0.1  

  • WebGrease 1.6.0 

  • System.Web.Mvc 5.2.8  

  • Microsoft.AspNet.WebApi.Client 5.2.8 

  • Microsoft.AspNet.WebApi 5.2.8  

  • Npgsql 6.0.4  

  • Oracle.ManagedDataAccess 21.5.0  

  • Microsoft.AspNet.WebApi.Tracing 5.2 

  • Antlr 3.5.0.2 

 

Command example shared below for updating package 

 

e.g. Update-package Newtonsoft.Json -Version 13.0.1 

 

After updating above Packages in ViennaAdvantageWeb Project, one need to update packages in other projects too, like  ViennaAdvantage and ViennaAdvantageSvc.  

 

NOTE : One need not to install/update all above packages in ViennaAdvantage and ViennaAdvantageSvc. Instead, open package config file of respective project and only update the required matching Packages. 

  

  1. New framework libraries References 

Below are the steps to update references of new framework libraries 

  1. Download the files from Vienna FTP. Ftp detail is given below. 

    IP:- betaftp.viennasolutions.com

    UserID : Vienna 

    Protocol:- SFTP 

    Port:- 22 

    Password :  (Contact to Vienna Support team) 

  2. Now open one project at a time, go to reference section of each project and remove the reference of following dlls, if exist in the respective projects. 

    • VIS.dll 

    • ViennaBase.dll 

    • Market.dll 

    • MarketSvc.dll 

    • ModelLibraray.dll 

  3. Now add all the reference from downloaded package's htmlbin folder of (Market, VIS, VAS & ViennaBase) into current project.  Please remove and add references of above mentioned dlls from (Market, VIS, VAS & ViennaBase) in ViennaAdvantageWeb and ViennaAdvantage projects in the solution. 

  4. Now for ViennaAdvantageSvc follow the same steps as mentioned above but do not add reference of VIS.dll, ViennaBase.dll and Market.dll in ViennaAdvantageSvc or *.svc project.  

  5. Copy the Areas folder from downloaded package's (Market, VIS, VAS & ViennaBase folder latest version) and replace with Area folder in ViennaAdvantageWeb project (if any area not found then add new). 

  

  1. Configuration changes  

After finishing all above steps, one has to add new configuration settings in Web config file of ViennaAdvantageWeb project. 

 

4.1 Change the target framework and add <assemblies> node in <compilation> node. 

 <compilation debug="true" targetFramework="4.8">
         <assemblies>
                  <add assembly="netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" />
         </assemblies>
</compilation> 


<httpRuntime maxRequestLength="214748364" executionTimeout="1200" targetFramework="4.8" />
<sessionState timeout="60" /> 

  

4.2 Replace the <runtime> section of web config with following. 

<runtime> 

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 

      <dependentAssembly> 

        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> 

        <bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" /> 

      </dependentAssembly> 

      <dependentAssembly> 

        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" /> 

        <bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" /> 

      </dependentAssembly> 

      <dependentAssembly> 

        <assemblyIdentity name="WebMatrix.WebData" publicKeyToken="31bf3856ad364e35" culture="neutral" /> 

        <bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> 

      </dependentAssembly> 

      <dependentAssembly> 

        <assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" /> 

        <bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> 

      </dependentAssembly> 

      <dependentAssembly> 

        <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" /> 

        <bindingRedirect oldVersion="0.0.0.0-5.2.8.0" newVersion="5.2.8.0" /> 

      </dependentAssembly> 

      <dependentAssembly> 

        <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" /> 

        <bindingRedirect oldVersion="0.0.0.0-5.2.8.0" newVersion="5.2.8.0" /> 

      </dependentAssembly> 

      <dependentAssembly> 

        <publisherPolicy apply="no" /> 

        <assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" /> 

      </dependentAssembly> 

      <dependentAssembly> 

        <assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> 

        <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" /> 

      </dependentAssembly> 

      <dependentAssembly> 

        <assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> 

        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> 

      </dependentAssembly> 

      <dependentAssembly> 

        <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> 

        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> 

      </dependentAssembly> 

      <dependentAssembly> 

        <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" /> 

        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> 

      </dependentAssembly> 

      <dependentAssembly> 

        <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" /> 

        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> 

      </dependentAssembly> 

      <dependentAssembly> 

        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /> 

        <bindingRedirect oldVersion="0.0.0.0-5.2.8.0" newVersion="5.2.8.0" /> 

      </dependentAssembly> 

      <dependentAssembly> 

        <assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral" /> 

        <bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" /> 

      </dependentAssembly> 

      <dependentAssembly> 

        <assemblyIdentity name="CrystalDecisions.CrystalReports.Engine" publicKeyToken="692fbea5521e1304" culture="neutral" /> 

        <bindingRedirect oldVersion="0.0.0.0-13.0.4000.0" newVersion="13.0.4000.0" /> 

      </dependentAssembly> 

      <dependentAssembly> 

        <assemblyIdentity name="CrystalDecisions.Shared" publicKeyToken="692fbea5521e1304" culture="neutral" /> 

        <bindingRedirect oldVersion="0.0.0.0-13.0.4000.0" newVersion="13.0.4000.0" /> 

      </dependentAssembly> 

    </assemblyBinding> 

  </runtime> 

 

NOTE : After doing all the above modifications, please test your application and run all the possible test scenarios before deployment on production. 

 

  HAPPY CODING !!!