ASP.NET .dll 文件问题

问题描述 投票:0回答:1

我有 VB 2008 版本的 .dll 文件,我需要编辑 .dll 并在同一版本中再次构建,但有些我无法更改相同的版本。

下面是.dll反编译代码,但是编辑后,我无法在旧版本的VB中构建。我需要在每种情况下都返回 true。谁能在 2008 版本中构建这个文件,我将不胜感激。

// eBuildDataAccessLayer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// eBuildDataAccessLayer.Admin.License.LicenseValidator
using System;
using Microsoft.Win32;
using Utility.ErrorLog;

public static string ValidateLicense()
{
    RegistryKey keyGUID = Registry.ClassesRoot.OpenSubKey(strGUID);
    if (keyGUID != null)
    {
        string strLicense = Convert.ToString(keyGUID.GetValue("License"));
        string strSignature = Convert.ToString(keyGUID.GetValue("Signature"));

        try
        {
            if (VerifySignature(Convert.FromBase64String(strLicense), Convert.FromBase64String(strSignature)))
            {
                try
                {
                    if (Decrypt(Convert.FromBase64String(strLicense)).Split(';').Length == 3)
                    {
                        bool flag = DateTime.Today < DateTime.Today;
                        return "True";
                    }

                    ErrorLogger.LogMessage("Invalid length of license key detected.");
                    return "Invalid license detected or license data is corrupted! Please contact ERP administrator!";
                }
                catch (Exception ex)
                {
                    ErrorLogger.LogMessage("Error while decrypting license data. Please refer exception below.");
                    ErrorLogger.LogError(ex);
                    return "Invalid license detected or license data is corrupted! Please contact ERP administrator!";
                }
            }

            return "Invalid license detected or license data is corrupted! Please contact ERP administrator!";
        }
        catch (Exception ex2)
        {
            ErrorLogger.LogMessage("Error while validating license signature. Please refer to the exception below.");
            ErrorLogger.LogError(ex2);
            return "Invalid license detected or license data is corrupted! Please contact ERP administrator!";
        }
    }

    return "License key not found! Please contact ERP administrator!";
}

尝试在 VB 2008 中构建但无法这样做

asp.net vb.net dll
1个回答
0
投票

已解决,我手动更改了 .csproj 中的版本,并在旧版本中进行了编译。感谢您抽出时间

© www.soinside.com 2019 - 2024. All rights reserved.