Skip to content

Updating Harmony Core

Steve Ives edited this page Mar 6, 2020 · 37 revisions

Updating to Harmony Core

Updating to Harmony Core 1.1.97 (.NET Core 3.1)

The update process involves multiple steps:

  • Update your NuGet package references

    • Harmony Core packages

      • Harmony.Core 1.1.97
      • Harmony.Core.AspNetCore 1.1.97
      • Harmony.Core.EF 1.1.97
      • Harmony.Core.OData 1.1.97
    • Synergy packages

      • Synergex.SynergyDE.Build 11.1.1030.2702
      • Synergex.SynergyDE.synrnt 11.1.1030
    • Other packages

      • Microsoft.AspNetCore (>= 2.2.0 && < 3.0.0)
      • Microsoft.AspNetCore.Mvc (>= 2.2.0 && < 3.0.0)
      • Microsoft.AspNetCore.Mvc.Core (>= 2.2.0 && < 3.0.0)
      • Microsoft.AspNetCore.OData (>= 7.2.2 && < 8.0.0)
      • Microsoft.EntityFrameworkCore (>= 2.2.6 && < 3.0.0)
      • Microsoft.Extensions.Caching.Memory (>= 2.2.0 && < 3.0.0)
      • Microsoft.Extensions.DependencyInjection (>= 2.2.0 && < 3.0.0)
      • Microsoft.OData.Core (>= 7.6.1 && < 8.0.0)
      • Microsoft.OData.Edm (>= 7.6.1 && < 8.0.0)
      • Microsoft.Spatial (>= 7.6.1 && < 8.0.0)
      • Microsoft.VisualStudio.Threading (>= 16.4.16 && < 17.0.0)
      • Newtonsoft.Json (>= 12.0.2)
      • Nito.AsyncEx (>= 5.0.0)
      • Remotion.Linq (>= 2.2.0)
      • SSH.NET (>= 2016.1.0)
      • StreamJsonRpc (>= 2.2.34 && < 3.0.0)
      • System.ComponentModel.Annotations (>= 4.6.0 && < 5.0.0)
      • System.Linq.Dynamic.Core (>= 1.0.19 && < 2.0.0)
  • Update your Harmony Core project templates. Each Harmony Core release also includes updated project templates that go along with that release. You can download and install the latest version of the project templates by executing the following command:

    dotnet new -i Harmony.Core.ProjectTemplates
    
  • Update the Synergy/DE Build package version in the repository project.

    Each time you update the Harmony Core version it may also be necessary to manually edit the repository project file (Repository.synproj) to review, and if necessary change the version of the Synergy build package being used.

    <Import Project="$(USERPROFILE)\.nuget\packages\synergex.synergyde.build\11.1.1030.2702-beta1\build\rps\Synergex.SynergyDE.Build.targets" Condition="Exists('$(USERPROFILE)\.nuget\packages\synergex.synergyde.build\11.1.1030.2702-beta1\build\rps\Synergex.SynergyDE.Build.targets')" />
    <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
      <PropertyGroup>
        <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
      </PropertyGroup>
      <Error Condition="!Exists('$(USERPROFILE)\.nuget\packages\synergex.synergyde.build\11.1.1030.2702-beta1\build\rps\Synergex.SynergyDE.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(USERPROFILE)\.nuget\packages\synergex.synergyde.build\11.1.1030.2702-beta1\build\rps\Synergex.SynergyDE.Build.targets'))" />
    </Target>
    

    In the example above the build package version is 11.1.1030.2702 and it is specified in FOUR places.

  • Extract and install the latest CodeGen templates.

  • Download and install the latest version of CodeGen

    It's always a good idea to keep CodeGen up to date, but new Harmony Core versions frequently require the latest version of CodeGen that is available at the time of release.

  • Re-generate your code.

    The final step of the process is to re-generate your code.

Clone this wiki locally