---
# System prepended metadata

title: WRAP 12 -> 13 Upgrade

---

# WRAP 12 -> 13 Upgrade

## Project files

- Update `<TargetFramework>net7.0</TargetFramework>` -> `<TargetFramework>net8.0</TargetFramework>` 
- Update udb.core
- Update Umbraco, UmbracoForms & WRAP references with Find & Replace to latest versions
- Find & Replace `Udb.Paging` => `Udb.Plugins.Paging`


- Update `Udb.GeoTargeting` => `Udb.Plugins.GeoTargeting`
- Update `Udb.Optimisation` => `Udb.Security.Optimisation`

- Rename (if exists) `Views/Partials/Molecules/Udb.Paging` => `Views/Partials/Molecules/Udb.Plugins.Paging`

## Startup.cs

- Update

```
if (_config.GetValue<bool>(
    Udb.Security.Optimisation.Services.NoncingService.KeyPrefix +
    Udb.Security.Optimisation.Services.NoncingService.NoncingEnabledConfigKey, false))
{
    u.UseUdbSecurityOptimisationMiddleware(_config);
}
```

=>

```u.UseUdbSecurityOptimisationMiddleware(_config);```


- Update

```
if (_config.GetValue<bool>("GeoTargeting:IsSetCountryCodeCookieActive", false))
{
    u.UseCountryCodeMiddleware();
}
```
=>
```
u.UseUdbPluginsGeoTargetingMiddleware(_config);
```

## AppSettings

- Add u13 login backgrounds to `Umbraco:CMS:Content:`

```
"Umbraco": {
    "CMS": {
      "Content": {
        "LoginBackgroundImage": "https://d319jwbf8lrq7u.cloudfront.net/umbracobackoffice/login-bg.jpg",
        "LoginLogoImage": "https://d319jwbf8lrq7u.cloudfront.net/umbracobackoffice/wr-logo.svg",
        "LoginLogoImageAlternative": "https://d319jwbf8lrq7u.cloudfront.net/umbracobackoffice/wr-logo-colour.svg"
        }
    }
}
```

- Update config for ReadTime from

```
"websiteReadTime": {
    "contentBlockAliases": [ "contentBlocks" ],
    "blocksAliasesToCalculate": [ "richTextBlock", "richContentBlock" ],
    "docTypeAliases": ["newsInternal"],
    "propertyAlias": "pageReadTime",
    "hoursReadSuffix": "hour read",
    "minutesReadSuffix": "minute read"
}
```

=>

```
Udb": {
    "Plugins": {
        "ReadTime": {
            "ContentBlockAliases": [ "contentBlocks" ],
            "BlocksAliasesToCalculate": [ "richTextBlock", "richContentBlock" ],
            "DocTypeAliases": [ "newsInternal" ],
            "PropertyAlias": "pageReadTime",
            "HoursReadSuffix": "hour read",
            "MinutesReadSuffix": "minute read"
        }
    }
}
```

## Search Changes

- Update

```
var predictiveSearchConfiguration = _searchConfigHelperService.GetSearchConfiguration<SearchPredictiveKeywordConfiguration>(searchRequest.KeywordFilter.PredictiveKeywordConfigurationKey);
```

=>

```
var predictiveSearchConfiguration = _searchConfigHelperService.GetSearchConfigurationFromFile<SearchPredictiveKeywordConfiguration>(searchRequest.SearchConfigKey, true);
```

or, to conitnue to use the single file (not advised)

```
var predictiveSearchConfiguration = _searchConfigHelperService.GetSearchConfiguration<SearchPredictiveKeywordConfiguration>(searchRequest.SearchConfigKey);
```


## Views 

- Update `@Html.RenderUmbracoFormDependencies()` => `@Html.RenderUmbracoFormDependencies(Url)`

### Renderers/BlockList.cshtml 

- Update

```
@inject CacheConfigHelper _cacheConfigHelper
``` 

=>

```
@inject CoreConfigurationService CoreConfigurationService
```


- Update 

```
var cacheForSeconds = _cacheConfigHelper.CacheOutputForSeconds;
```

=> 

```
var cacheForSeconds = CoreConfigurationService.CacheOutputForSeconds;
``` 

### /Shared/Resources/Head/csp.cshtml  

- Update

```
﻿@using Udb.Security.Optimisation
@using Udb.Security.Optimisation.Services;
@using ConfigurationService = Udb.Security.Optimisation.Services.ConfigurationService
@inject NoncingService _noncingService;
@inject ConfigurationService _configurationService; 

```

- Update 

```
   var usingUdbOptimisation = _noncingService.IsEnabled 
```  

=> 

```
 var usingUdbOptimisation = _configurationService.EnableNoncing
``` 

