tenho seguinte código blazor

@page "/ProgressBar"

@using System;
@using System.Collections.Generic;
@using System.IO;
@using System.Net.Http;
@using System.Threading.Tasks;
@using NLua;
@using System.Security.Cryptography;

<div class="absolute bottom-3 rounded-lg w-[71%] h-[8%] flex flex-col justify-between items-center">

    <p class="text-[14px] font-bold text-opacity-[0.95] text-white text-center">
        @statusMessage
        @if (currentFile != null)
        {
            <span class="text-[#d16b2b] px-2 py-1 rounded"> @currentFile.FileName </span>
            <span class="text-[#38D12B] text-opacity-[0.95]">
              @formatBytes(downloadedBytes);
            </span>
            /
            @formatBytes(totalBytes);
        }
    </p>

    @if (currentFile != null)
    {
        <div class="w-[95%] bg-[#0E1622]/[0.95] rounded-md h-5 flex items-center">
            <div class="bg-[#1164CA]/[0.95] ml-1 rounded-md h-4 transition-all duration-300" style="width:@progressPercent">
            </div>
        </div>
    }
</div>

@code {
    private List<UpdateFile> updateFiles = new();
    private UpdateFile currentFile;
    private int totalFiles;
    private int currentFileIndex;
    private string statusMessage;
    private long totalBytes;
    private long downloadedBytes;
    private string progressPercent = "0%";

    protected override async Task OnInitializedAsync()
    {
        await LoadPatchFileAsync();
        totalFiles = updateFiles.Count;
        currentFileIndex = 0;

        statusMessage = "Conectando ao servidor...";
        bool serverConnected = await CheckServerAvailabilityAsync();

        if (!serverConnected)
        {
            statusMessage = "Erro: Servidor indisponível";
            return;
        }

        statusMessage = "Autenticando o servidor...";
        bool serverAuthenticated = await AuthenticateServerAsync();

        if (!serverAuthenticated)
        {
            statusMessage = "Erro: Acesso negado";
            return;
        }

        statusMessage = "Preparando para iniciar o download...";
        await Task.Delay(1000);

        await StartDownloadAsync();
    }

    private async Task LoadPatchFileAsync()
    {
        // Caminho do arquivo patch.lua
        string patchFilePath = Path.Combine(AppContext.BaseDirectory, "patch.lua");

        if (File.Exists(patchFilePath))
        {
            string luaContent = await File.ReadAllTextAsync(patchFilePath);

            // Parsear o conteúdo do arquivo Lua usando NLua
            updateFiles = ParseLuaUpdates(luaContent);
        }
        else
        {
            statusMessage = "Erro: Arquivo patch.lua não encontrado";
        }
    }

    private List<UpdateFile> ParseLuaUpdates(string luaContent)
    {
        var updates = new List<UpdateFile>();

        using (var lua = new Lua())
        {
            try
            {
                // Carregar o script Lua
                lua.DoString(luaContent);

                // Obter a tabela 'updates'
                var luaUpdates = lua.GetTable("updates");

                if (luaUpdates != null)
                {
                    // Percorrer cada item na tabela 'updates'
                    foreach (var key in luaUpdates.Keys)
                    {
                        var item = luaUpdates[key];
                        if (item is LuaTable luaUpdate)
                        {
                            var updateFile = new UpdateFile();

                            // Extrair os valores de cada campo
                            foreach (var fieldKey in luaUpdate.Keys)
                            {
                                var value = luaUpdate[fieldKey];

                                switch (fieldKey.ToString())
                                {
                                    case "Version":
                                        updateFile.Version = Convert.ToInt32(value);
                                        break;
                                    case "FileName":
                                        updateFile.FileName = value.ToString();
                                        break;
                                    case "Integrity":
                                        updateFile.Integrity = value.ToString();
                                        break;
                                }
                            }

                            updates.Add(updateFile);
                        }
                    }
                }
                else
                {
                    statusMessage = "Erro: Não foi possível encontrar a tabela 'updates' no arquivo Lua.";
                }
            }
            catch (Exception ex)
            {
                statusMessage = "Erro ao interpretar o arquivo Lua: " + ex.Message;
            }
        }

        return updates;
    }

    private async Task<bool> CheckServerAvailabilityAsync()
    {
        try
        {
            using var httpClient = new HttpClient();
            httpClient.Timeout = TimeSpan.FromSeconds(5);

            var response = await httpClient.GetAsync("https://hil-speed.hetzner.com");

            return response.IsSuccessStatusCode;
        }
        catch
        {
            return false;
        }
    }

    private async Task<bool> AuthenticateServerAsync()
    {
        // Supondo que a autenticação seja sempre bem-sucedida para este exemplo
        await Task.Delay(500);
        return true;
    }

    private async Task StartDownloadAsync()
    {
        for (int i = 0; i < updateFiles.Count; i++)
        {
            currentFileIndex = i + 1;
            currentFile = updateFiles[i];

            statusMessage = $"Baixando arquivo ({currentFileIndex} / {totalFiles}):";

            // Caminho do arquivo na pasta "patch"
            string patchesFolderPath = Path.Combine(AppContext.BaseDirectory, "patch");

            if (!Directory.Exists(patchesFolderPath))
            {
                Directory.CreateDirectory(patchesFolderPath);
            }

            string localFilePath = Path.Combine(patchesFolderPath, currentFile.FileName);

            if (File.Exists(localFilePath))
            {
                statusMessage = "O arquivo já existe, verificando se é necessário fazer download...";

                string localFileHash = GetFileHash(localFilePath);

                if (localFileHash == currentFile.Integrity)
                {
                    statusMessage = $"Arquivo {currentFile.FileName} já está atualizado.";
                    await Task.Delay(1000);
                    continue;
                }
                else
                {
                    statusMessage = $"Arquivo {currentFile.FileName} está desatualizado, baixando nova versão...";
                }
            }

            bool downloadSuccess = await DownloadFileAsync(currentFile, localFilePath);

            if (!downloadSuccess)
            {
                statusMessage = $"Erro ao baixar {currentFile.FileName}";
                await Task.Delay(2000);
            }
        }

        currentFile = null; // Nenhum arquivo está sendo baixado agora
        statusMessage = "Download concluído.";
    }

    private async Task<bool> DownloadFileAsync(UpdateFile file, string destinationPath)
    {
        string url = $"https://hil-speed.hetzner.com/{file.FileName}";
        downloadedBytes = 0;
        totalBytes = 0;
        progressPercent = "0%";

        try
        {
            using var httpClient = new HttpClient();

            var response = await httpClient.GetAsync(url, HttpCompletionOption.ResponseHeadersRead);

            if (response.StatusCode == System.Net.HttpStatusCode.NotFound)
            {
                for (int i = 5; i > 0; i--)
                {
                    statusMessage = $"Erro: Arquivo não encontrado (404), saltando em {i} segundos";
                    await Task.Delay(1000);
                }
                return false;
            }

            response.EnsureSuccessStatusCode();

            totalBytes = response.Content.Headers.ContentLength ?? 0;

            using var contentStream = await response.Content.ReadAsStreamAsync();
            using var fileStream = new FileStream(destinationPath, FileMode.Create, FileAccess.Write, FileShare.None, 8192, true);

            var buffer = new byte[8192];
            int bytesRead;

            while ((bytesRead = await contentStream.ReadAsync(buffer.AsMemory(0, buffer.Length))) > 0)
            {
                await fileStream.WriteAsync(buffer.AsMemory(0, bytesRead));
                downloadedBytes += bytesRead;

                progressPercent = ((double)downloadedBytes / totalBytes * 100).ToString("0.00") + "%";

                StateHasChanged();
            }

            // Verificar a integridade do arquivo baixado
            string downloadedFileHash = GetFileHash(destinationPath);

            if (downloadedFileHash != file.Integrity)
            {
                statusMessage = $"Erro: Integridade do arquivo {file.FileName} falhou.";
                return false;
            }

            return true;
        }
        catch (Exception ex)
        {
            statusMessage = "Erro durante o download: " + ex.Message;
            await Task.Delay(2000);
            statusMessage = "Reiniciando o download...";
            await Task.Delay(1000);

            // Retomar o download interrompido
            return await ResumeDownloadAsync(file, destinationPath);
        }
    }

    private async Task<bool> ResumeDownloadAsync(UpdateFile file, string destinationPath)
    {
        string url = $"https://hil-speed.hetzner.com/{file.FileName}";
        downloadedBytes = 0;
        progressPercent = "0%";

        try
        {
            using var httpClient = new HttpClient();

            // Obter o tamanho já baixado
            long existingLength = 0;
            if (File.Exists(destinationPath))
            {
                var fileInfo = new FileInfo(destinationPath);
                existingLength = fileInfo.Length;
            }

            var request = new HttpRequestMessage(HttpMethod.Get, url);
            request.Headers.Range = new System.Net.Http.Headers.RangeHeaderValue(existingLength, null);

            var response = await httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead);

            if (response.StatusCode == System.Net.HttpStatusCode.RequestedRangeNotSatisfiable)
            {
                // Arquivo completo já baixado
                return true;
            }

            response.EnsureSuccessStatusCode();

            totalBytes = (response.Content.Headers.ContentRange?.Length ?? response.Content.Headers.ContentLength ?? 0) + existingLength;

            using var contentStream = await response.Content.ReadAsStreamAsync();
            using var fileStream = new FileStream(destinationPath, FileMode.Append, FileAccess.Write, FileShare.None, 8192, true);

            var buffer = new byte[8192];
            int bytesRead;

            while ((bytesRead = await contentStream.ReadAsync(buffer.AsMemory(0, buffer.Length))) > 0)
            {
                await fileStream.WriteAsync(buffer.AsMemory(0, bytesRead));
                downloadedBytes += bytesRead;

                progressPercent = ((double)(downloadedBytes + existingLength) / totalBytes * 100).ToString("0.00") + "%";

                StateHasChanged();
            }

            // Verificar a integridade do arquivo baixado
            string downloadedFileHash = GetFileHash(destinationPath);

            if (downloadedFileHash != file.Integrity)
            {
                statusMessage = $"Erro: Integridade do arquivo {file.FileName} falhou.";
                return false;
            }

            return true;
        }
        catch (Exception ex)
        {
            statusMessage = "Erro durante o download: " + ex.Message;
            await Task.Delay(2000);
            statusMessage = "Reiniciando o download...";
            await Task.Delay(1000);

            // Tentar novamente
            return await ResumeDownloadAsync(file, destinationPath);
        }
    }

    private string GetFileHash(string filePath)
    {
        using var sha256 = SHA256.Create();
        using var stream = File.OpenRead(filePath);

        byte[] hash = sha256.ComputeHash(stream);

        // Retornar hash em formato de string hexadecimal
        return BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant();
    }

    private string formatBytes(long bytes)
    {
        if (bytes <= 0)
            return "0 B";

        string[] sizes = { "B", "KB", "MB", "GB", "TB" };
        int order = (int)Math.Floor(Math.Log(bytes, 1024));
        double adjustedSize = bytes / Math.Pow(1024, order);

        return $"{adjustedSize:0.##} {sizes[order]}";
    }
}

recebo os erros

[{
	"resource": "/c:/Users/jonatas/Desktop/Megasantos/RagnaTales/src/Pages/app/ProgressBar.razor",
	"owner": "_generated_diagnostic_collection_name_#2",
	"code": {
		"value": "CS1525",
		"target": {
			"$mid": 1,
			"external": "https://msdn.microsoft.com/query/roslyn.query?appId%3Droslyn%26k%3Dk%28CS1525%29",
			"path": "/query/roslyn.query",
			"scheme": "https",
			"authority": "msdn.microsoft.com",
			"query": "appId=roslyn&k=k(CS1525)"
		}
	},
	"severity": 8,
	"message": "Invalid expression term '/'",
	"startLineNumber": 19,
	"startColumn": 44,
	"endLineNumber": 20,
	"endColumn": 20
},{
	"resource": "/c:/Users/jonatas/Desktop/Megasantos/RagnaTales/src/Pages/app/ProgressBar.razor",
	"owner": "_generated_diagnostic_collection_name_#2",
	"code": {
		"value": "CS0246",
		"target": {
			"$mid": 1,
			"path": "/query/roslyn.query",
			"scheme": "https",
			"authority": "msdn.microsoft.com",
			"query": "appId=roslyn&k=k(CS0246)"
		}
	},
	"severity": 8,
	"message": "The type or namespace name 'UpdateFile' could not be found (are you missing a using directive or an assembly reference?)",
	"startLineNumber": 36,
	"startColumn": 18,
	"endLineNumber": 36,
	"endColumn": 28
},{
	"resource": "/c:/Users/jonatas/Desktop/Megasantos/RagnaTales/src/Pages/app/ProgressBar.razor",
	"owner": "_generated_diagnostic_collection_name_#2",
	"code": {
		"value": "CS0246",
		"target": {
			"$mid": 1,
			"path": "/query/roslyn.query",
			"scheme": "https",
			"authority": "msdn.microsoft.com",
			"query": "appId=roslyn&k=k(CS0246)"
		}
	},
	"severity": 8,
	"message": "The type or namespace name 'UpdateFile' could not be found (are you missing a using directive or an assembly reference?)",
	"startLineNumber": 37,
	"startColumn": 13,
	"endLineNumber": 37,
	"endColumn": 23
},{
	"resource": "/c:/Users/jonatas/Desktop/Megasantos/RagnaTales/src/Pages/app/ProgressBar.razor",
	"owner": "_generated_diagnostic_collection_name_#2",
	"code": {
		"value": "CS0246",
		"target": {
			"$mid": 1,
			"path": "/query/roslyn.query",
			"scheme": "https",
			"authority": "msdn.microsoft.com",
			"query": "appId=roslyn&k=k(CS0246)"
		}
	},
	"severity": 8,
	"message": "The type or namespace name 'UpdateFile' could not be found (are you missing a using directive or an assembly reference?)",
	"startLineNumber": 93,
	"startColumn": 18,
	"endLineNumber": 93,
	"endColumn": 28
},{
	"resource": "/c:/Users/jonatas/Desktop/Megasantos/RagnaTales/src/Pages/app/ProgressBar.razor",
	"owner": "_generated_diagnostic_collection_name_#2",
	"code": {
		"value": "CS0246",
		"target": {
			"$mid": 1,
			"path": "/query/roslyn.query",
			"scheme": "https",
			"authority": "msdn.microsoft.com",
			"query": "appId=roslyn&k=k(CS0246)"
		}
	},
	"severity": 8,
	"message": "The type or namespace name 'UpdateFile' could not be found (are you missing a using directive or an assembly reference?)",
	"startLineNumber": 95,
	"startColumn": 32,
	"endLineNumber": 95,
	"endColumn": 42
},{
	"resource": "/c:/Users/jonatas/Desktop/Megasantos/RagnaTales/src/Pages/app/ProgressBar.razor",
	"owner": "_generated_diagnostic_collection_name_#2",
	"code": {
		"value": "CS0246",
		"target": {
			"$mid": 1,
			"path": "/query/roslyn.query",
			"scheme": "https",
			"authority": "msdn.microsoft.com",
			"query": "appId=roslyn&k=k(CS0246)"
		}
	},
	"severity": 8,
	"message": "The type or namespace name 'UpdateFile' could not be found (are you missing a using directive or an assembly reference?)",
	"startLineNumber": 115,
	"startColumn": 50,
	"endLineNumber": 115,
	"endColumn": 60
},{
	"resource": "/c:/Users/jonatas/Desktop/Megasantos/RagnaTales/src/Pages/app/ProgressBar.razor",
	"owner": "_generated_diagnostic_collection_name_#2",
	"code": {
		"value": "CS0246",
		"target": {
			"$mid": 1,
			"path": "/query/roslyn.query",
			"scheme": "https",
			"authority": "msdn.microsoft.com",
			"query": "appId=roslyn&k=k(CS0246)"
		}
	},
	"severity": 8,
	"message": "The type or namespace name 'UpdateFile' could not be found (are you missing a using directive or an assembly reference?)",
	"startLineNumber": 228,
	"startColumn": 48,
	"endLineNumber": 228,
	"endColumn": 58
},{
	"resource": "/c:/Users/jonatas/Desktop/Megasantos/RagnaTales/src/Pages/app/ProgressBar.razor",
	"owner": "_generated_diagnostic_collection_name_#2",
	"code": {
		"value": "CS0246",
		"target": {
			"$mid": 1,
			"path": "/query/roslyn.query",
			"scheme": "https",
			"authority": "msdn.microsoft.com",
			"query": "appId=roslyn&k=k(CS0246)"
		}
	},
	"severity": 8,
	"message": "The type or namespace name 'UpdateFile' could not be found (are you missing a using directive or an assembly reference?)",
	"startLineNumber": 294,
	"startColumn": 50,
	"endLineNumber": 294,
	"endColumn": 60
},{
	"resource": "/c:/Users/jonatas/Desktop/Megasantos/RagnaTales/src/Pages/app/ProgressBar.razor",
	"owner": "_generated_diagnostic_collection_name_#2",
	"code": {
		"value": "CS8618",
		"target": {
			"$mid": 1,
			"path": "/query/roslyn.query",
			"scheme": "https",
			"authority": "msdn.microsoft.com",
			"query": "appId=roslyn&k=k(CS8618)"
		}
	},
	"severity": 4,
	"message": "Non-nullable field 'statusMessage' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.",
	"startLineNumber": 40,
	"startColumn": 20,
	"endLineNumber": 40,
	"endColumn": 33
}]