---
title: V8 Scripts
slug: v8-scripts
createdAt: 2025-06-11T20:26:20.404Z
---

.NET Core is architected quite differently and is split up into more DLL's. So some functions that were previously in the core system DLL and now is another DLL.

From example, this script works in V7.

```csharp
using System;
using System.Web;
using Innovation.Activate;

class Script : ScriptBase
{
    public void main()
    {
        Trace.WriteLine(System.Web.HttpUtility.HtmlEncode("hello world")); 
    }
}
```

In V8 the following error occurs when the script is complied.

```text
(9,19): error CS1069: The type name 'HttpUtility' could not be found in the namespace 'System.Web'. This type has been forwarded to assembly 'System.Web.HttpUtility, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly.
```

This is because the HttpUtility classes have been moved. This is very simple to fix by adding a reference to System.Web.Utility at the top of the file.

```text
//@import System.Web.Utility
```

So the final script becomes

```text
//@import System.Web.Utility
using System;
using System.Web;
using Innovation.Activate;

class Script : ScriptBase
{
    public void main()
    {
        Trace.WriteLine(System.Web.HttpUtility.HtmlEncode("hello world")); 
    }
}
```

These issues can easily be found using a Verify within Activate Administrator. The following are some examples of changes that are required.

| &#x20;                     |                                          |
| -------------------------- | ---------------------------------------- |
| **Class being referenced** | **Import Required**                      |
| HttpWebRequest             | //@import System.Net.Requests            |
| Uri                        | //@import System.Private.Uri             |
| RegEx                      | //@import System.Text.RegularExpressions |

