{"id":37873,"date":"2025-09-30T11:26:47","date_gmt":"2025-09-30T10:26:47","guid":{"rendered":"https:\/\/developers.ila.cegid.com\/en\/forum\/erro-a-emitir-fatura-com-motores-microsoft-csharp-runtimebinder-runtimebinder-bind\/"},"modified":"2025-09-30T11:26:48","modified_gmt":"2025-09-30T10:26:48","slug":"erro-a-emitir-fatura-com-motores-microsoft-csharp-runtimebinder-runtimebinder-bind","status":"publish","type":"cma_thread","link":"https:\/\/developers.ila.cegid.com\/en\/forum\/erro-a-emitir-fatura-com-motores-microsoft-csharp-runtimebinder-runtimebinder-bind\/","title":{"rendered":"Erro a emitir fatura com motores  Microsoft.CSharp.RuntimeBinder.RuntimeBinder.Bind"},"content":{"rendered":"<p>Bom dia,<\/p>\n<p>efetuamos nova instalacao do PPrimavera V10 em novo servidor tendo ficado tudo a funcionar no postos dos colaboradores.<\/p>\n<p>relativamente a aplicacao desenvolvida em .net para integracao e emissao de faturas atraves dos motores de integracao do Primavera estou com um erro bastante estranho.<\/p>\n<p>a mensagem da excep\u00e7\u00e3o \u00e9 &#8220;Ocorreu uma excep\u00e7\u00e3o inesperada ao vincular uma opera\u00e7\u00e3o din\u00e2mica&#8221;<\/p>\n<p>A source da excep\u00e7\u00e3o \u00e9 Microsoft.CSharp e ao analisar o stacktrace tenho seguinte:<\/p>\n<p>em Microsoft.CSharp.RuntimeBinder.RuntimeBinder.Bind(DynamicMetaObjectBinder payload, IEnumerable`1 parameters, DynamicMetaObject[] args, DynamicMetaObject&amp; deferredBinding)<br \/>\nem Microsoft.CSharp.RuntimeBinder.BinderHelper.Bind(DynamicMetaObjectBinder action, RuntimeBinder binder, IEnumerable`1 args, IEnumerable`1 arginfos, DynamicMetaObject onBindingError)<br \/>\nem Microsoft.CSharp.RuntimeBinder.CSharpInvokeMemberBinder.FallbackInvokeMember(DynamicMetaObject target, DynamicMetaObject[] args, DynamicMetaObject errorSuggestion)<br \/>\nem System.Dynamic.DynamicMetaObject.BindInvokeMember(InvokeMemberBinder binder, DynamicMetaObject[] args)<br \/>\nem System.Dynamic.InvokeMemberBinder.Bind(DynamicMetaObject target, DynamicMetaObject[] args)<br \/>\nem System.Dynamic.DynamicMetaObjectBinder.Bind(Object[] args, ReadOnlyCollection`1 parameters, LabelTarget returnLabel)<br \/>\nem System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, Object[] args)<br \/>\nem System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1)<br \/>\nem FuncoesComuns100.clsBSDocumentos.RateiaDescontosEmValor(Object DocumentoOriginal)<br \/>\nem VndBS100.VndBSVendas.CalculaValoresTotais(VndBEDocumentoVenda clsDocumentoVenda)<br \/>\nem VndBS100.VndBSVendas.CalculaTotaisDocumento(VndBEDocumentoVenda DocVenda)<br \/>\nem VndBS100.VndBSVendas.PreencheDadosActualiza(VndBEDocumentoVenda DocumentoVenda, VndBETabVenda&amp; TabVenda, BasBESerie&amp; Serie, String&amp; SerieLiq, Int32&amp; Multiplicador)<br \/>\nem VndBS100.VndBSVendas.Actualiza(VndBEDocumentoVenda clsDocumentoVenda, String&amp; strAvisos, String&amp; IdDocLiqRet, String&amp; IdDocLiqRetGar, Boolean blnPreencheDadosRelacionados)<br \/>\nem VndBS100.VndBSVendas.Actualiza(VndBEDocumentoVenda clsDocumentoVenda, String&amp; strAvisos)<br \/>\nem Faturas_Accountive.Form1.Pri_Create_Invoice(String BD, DataRow InfoDocVenda) em E:\\DELTASYS\\Projectos VBA\\Projecto Faturas Accountive\\GestorPrimavera\\GestorPrimavera\\Form1.vb:line 1522<\/p>\n<p>A referencia para a dll microsoft.csharp foi adicionada ao projecto assim como todas as dlls necess\u00e1rias do primavera.<\/p>\n<p>inclusive antes de tentar emitir a fatura efetuei a validacao<\/p>\n<p>If Motor.Vendas.Documentos.ValidaActualizacao(Doc, r, &#8220;&#8221;, stravisos,) Then<\/p>\n<p>Motor.Vendas.Documentos.Actualiza(Doc, stravisos)<\/p>\n<p>end if<\/p>\n<p>nao tendo recebido nenhum aviso.<\/p>\n<p>&nbsp;<\/p>\n<p>Agrade\u00e7o desde j\u00e1 a vossa ajuda.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Bom dia, efetuamos nova instalacao do PPrimavera V10 em novo servidor tendo ficado tudo a funcionar no postos dos colaboradores. relativamente a aplicacao desenvolvida em .net para integracao e emissao de faturas atraves dos motores de integracao do Primavera estou com um erro bastante estranho. a mensagem da excep\u00e7\u00e3o \u00e9 &#8220;Ocorreu uma excep\u00e7\u00e3o inesperada ao [&hellip;]<\/p>\n","protected":false},"author":689,"featured_media":0,"template":"","tags":[],"cma_category":[],"cma_difficulty_level":[],"forum-tag":[370,374],"class_list":["post-37873","cma_thread","type-cma_thread","status-publish","hentry","forum-tag-integration","forum-tag-v10-en","forum-languages-pt"],"_links":{"self":[{"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/cma_thread\/37873","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/cma_thread"}],"about":[{"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/types\/cma_thread"}],"author":[{"embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/users\/689"}],"wp:attachment":[{"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/media?parent=37873"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/tags?post=37873"},{"taxonomy":"cma_category","embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/cma_category?post=37873"},{"taxonomy":"cma_difficulty_level","embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/cma_difficulty_level?post=37873"},{"taxonomy":"forum-tag","embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/forum-tag?post=37873"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}