Error when opening ERP V10 engine in VB.NET

0

I'm doing a first test in VB.NET to open the ERP V10 engine externally.

Running this program causes the error:

System.IO.FileNotFoundException: 'The file or assembly' StdPlatBS100, Version = 10.0.0.0, Culture = neutral, PublicKeyToken = 11cd844aca152173 'or one of its dependencies could not be loaded. The system could not find the file specified. '

The code I'm using:

Imports ErpBS100
Imports Primavera.Extensibility.Engine
Imports StdBE100
Imports StdPlatBS100
Imports System
Imports StdBE100.StdBETipos

Module Teste

        Sub Main()

            Dim Username As String = "paulo"
            Dim Password As String = "*****"
            Dim Instance As String = "Default"
            Dim Empresa As String = "DEMO"

            Dim objTrans As New StdBE100.StdBETransaccao

            Dim MotorERP As ErpBS100.ErpBS
            Dim objAplConf As StdBSConfApl = New StdBSConfApl
            Dim Plataforma As StdPlatBS = New StdPlatBS


            Dim objTipoPlataforma As StdBE100.StdBETipos.EnumTipoPlataforma
            objTipoPlataforma = StdBE100.StdBETipos.EnumTipoPlataforma.tpEmpresarial


            objAplConf.Instancia = Instance
            objAplConf.AbvtApl = "ERP"
            objAplConf.LicVersaoMinima = "10.00"
            objAplConf.Utilizador = Username
            objAplConf.PwdUtilizador = Password

            Plataforma.AbrePlataformaEmpresa(Empresa, objTrans, objAplConf, objTipoPlataforma)

            MotorERP = New ErpBS100.ErpBS
            MotorERP.AbreEmpresaTrabalho(objTipoPlataforma, Empresa, Username, Password, objTrans, Instance, True)
            '---------------------
            '---------------------
            MotorERP.FechaEmpresaTrabalho()
        End Sub

    End Module
asked by anonymous 21.08.2018 / 18:05

1 answer

2

The problem has to do with the resolve of the assemblies . This can be resolved by changing the Build output path to the APL folder

21.08.2018 / 19:14