Upgrade to GeoBlazor Pro

If you have started an application with the free GeoBlazor Core library, and later want to take advantage of the expanded feature set and support of the GeoBlazor Pro library, here are the simple set of steps to upgrade your projects.

  1. Visit https://licensing.dymaptic.com, and generate a new GeoBlazor Pro license key.
  2. Replace the GeoBlazor Core key in your appsettings.json or secrets.json with the new Pro key.

    {
      "ArcGISApiKey": "THIS_DOES_NOT_CHANGE",
      "GeoBlazor": {
        "LicenseKey": "THIS_SHOULD_BE_YOUR_NEW_PRO_KEY"
      }
    } 
    
  3. Remove the NuGet package reference for GeoBlazor Core.

    From command line:

    dotnet package remove dymaptic.GeoBlazor.Core
    

    Or directly in the .csproj file:

    <ItemGroup>
      <!-- DELETE THIS NEXT LINE --->
      <PackageReference Include="dymaptic.GeoBlazor.Core" Version="4.1.0" />
    </ItemGroup>
    
  4. Add the NuGet package reference for GeoBlazor Pro.

    From command line:

    dotnet package add dymaptic.GeoBlazor.Pro
    

    Or directly in the .csproj file:

    <ItemGroup>
      <!-- ADD THIS NEXT LINE --->
      <PackageReference Include="dymaptic.GeoBlazor.Pro" Version="4.1.0" />
    </ItemGroup>
    
  5. Replace the AddGeoBlazor line in Program.cs with AddGeoBlazorPro.

    builder.Services.AddGeoBlazorPro(builder.Configuration);
    
  6. Add the following GeoBlazor Pro Using statements to _Imports.razor. Don’t remove the Core namespaces, as you will still use many types from GeoBlazor Core.

    @using dymaptic.GeoBlazor.Pro
    @using dymaptic.GeoBlazor.Pro.Components
    @using dymaptic.GeoBlazor.Pro.Components.Geometries
    @using dymaptic.GeoBlazor.Pro.Components.Layers
    @using dymaptic.GeoBlazor.Pro.Components.Popups
    @using dymaptic.GeoBlazor.Pro.Components.Renderers
    @using dymaptic.GeoBlazor.Pro.Components.Widgets
    @using dymaptic.GeoBlazor.Pro.Enums
    @using dymaptic.GeoBlazor.Pro.Events
    @using dymaptic.GeoBlazor.Pro.Functions
    @using dymaptic.GeoBlazor.Pro.Interfaces
    @using dymaptic.GeoBlazor.Pro.Model
    @using dymaptic.GeoBlazor.Pro.Options
    @using dymaptic.GeoBlazor.Pro.Results
    
  7. Add the following single line to your App.razor, index.html or other file containing your HTML head content. This should be joining existing references to GeoBlazor Core.

    <!-- Add this next line --->
    <link href="_content/dymaptic.GeoBlazor.Pro" />
    <!-- OR, if using the @Assets dictionary for .NET 9+ compression, use the following --->
    <link href="@Assets["_content/dymaptic.GeoBlazor.Pro"]" />
    
  8. Finally, we always suggest to clear out bin and obj folders, as well as open the browser developer tools and choose disable cache once after an upgrade, to ensure that all the new assets are being loaded correctly. If you encounter any issues, join our Discord server or contact us for support.