Error opening V10 engine - Can not execute runtime binding on a null reference

1

I have an error in the last build when opening the platform something wrong or changed in the last build of V10?

try
{
    Empresa = "DEMOV10";
    Instancia = "DEFAULT";
    Utilizador = "Primavera";
    Password = "Primavera";
    TipoPlataforma = EnumTipoPlataforma.tpEmpresarial;

    ERP = new ErpBS();
    Plataforma = new StdPlatBS();

    StdBSConfApl configuracao = new StdBSConfApl();
    configuracao.AbvtApl = "ERP";
    configuracao.Instancia = (Instancia == null || Instancia == "" ? "DEFAULT" : Instancia);
    configuracao.Utilizador = Utilizador;
    configuracao.PwdUtilizador = Password;
    configuracao.LicVersaoMinima = "10.0";

    var tran = new StdBETransaccao();

    //Abre o Administrador
    Administrador = new AdmBS();
    Administrador.AbrePRIEMPRE((EnumTipoPlataforma)TipoPlataforma, Utilizador, Password, tran, Instancia == "" ? "Default" : Instancia);

    //Se existem empresas
    if (Administrador.Empresas != null && Administrador.Empresas.ListaEmpresas().NumItens > 0)
    {
        try
        {
            Plataforma.AbrePlataformaEmpresa(Empresa, null, configuracao, (EnumTipoPlataforma)TipoPlataforma);

            ConnectionString = Plataforma.BaseDados.DaFullConnectionStringNET("PRI" + Empresa, configuracao.Instancia, "English");
        }
        catch (Exception ex)
        {
            mensagem += ex.Message + Environment.NewLine;

            MessageBox.Show("Erro: " + ex.Message);
            return;
        }
    }

    MessageBox.Show("Abertura com sucesso da Empresa : " + Empresa);
    return;
}
catch (Exception ex3)
{
    MessageBox.Show("Erro: " + ex3.Message);
    return;
}
    
asked by anonymous 25.09.2018 / 13:55

1 answer

3

Bruno

This is not an error and it happens for a simple reason. The SPRING 10 assemblies are not registered in the GAC, so it is impossible that your application can reach the assemblies of PRIMAVERA if there is no assembly to solve or alternatively your application is in the SPRING APL folder.

    
26.09.2018 / 17:43