SAP Application scope TypeInitializationException error

Hi,I am trying to SAP Application Scope, I got a TypeInitializationException error as shown below.Please advice to solve this error.
・SAP Version:770
・SAP.BAPI.Activities Version:2.2.5

error: System.TypeInitializationException: ‘UiPath.SAP.BAPI.ConnectionService.SapConnectionService.SapConnectionService’ のタイプ初期化子が例外をスローしました。 —> System.IO.FileNotFoundException: ファイルまたはアセンブリ ‘sapnco, Version=3.0.0.42, Culture=neutral, PublicKeyToken=*****’、またはその依存関係の 1 つが読み込めませんでした。指定されたファイルが見つかりません。
場所 UiPath.SAP.BAPI.ConnectionService.SapConnectionService.SapConnectionService…cctor()
— 内部例外スタック トレースの終わり —
場所 UiPath.SAP.BAPI.ConnectionService.SapConnectionService.SapConnectionService…ctor(Boolean stateFulConnection)
場所 UiPath.SAP.BAPI.Activities.SharedModel.SapSharedModel…ctor()
場所 UiPath.SAP.BAPI.Activities.Design.SapApplicationScopeDesigner.TestConnection_Click(Object sender, RoutedEventArgs e)
場所 System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
場所 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
場所 System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
場所 System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
場所 System.Windows.Controls.Primitives.ButtonBase.OnClick()
場所 System.Windows.Controls.Button.OnClick()
場所 System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
場所 System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
場所 System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
場所 System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
場所 System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
場所 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
場所 System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
場所 System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
場所 System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
場所 System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
場所 System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
場所 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
場所 System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
場所 System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
場所 System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
場所 System.Windows.Input.InputManager.ProcessStagingArea()
場所 System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
場所 System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
場所 System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
場所 System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
場所 System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
場所 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
場所 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
場所 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
場所 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
場所 System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
場所 MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
場所 MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
場所 MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
場所 MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
場所 System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
場所 System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
場所 System.Windows.Application.RunDispatcher(Object ignore)
場所 System.Windows.Application.RunInternal(Window window)
場所 System.Windows.Application.Run(Window window)
場所 UiPath.Studio.Shell.ShellApplication.StudioShellApplication.HandleBeforeLicensingInit()
場所 UiPath.Studio.Core.StudioApplication.StudioApplication.StartApplication()
場所 UiPath.Studio.Core.StudioApplication.StudioApplication.Start(String args), HResult -2146233036

UiPath.SAP.BAPI.ConnectionService.SapConnectionService.SapConnectionService…cctor()

HI @Haretoke

File Not Found, it means you have to install SAP Connector for Microsoft .NET 3.0 (NCo 3.0) which is a prerequisite for this activity pack.

See more here: https://docs.uipath.com/activities/lang-ja/docs/about-the-sap-bapi-activities-pack

Best regards, Lev

1 Like

Hi @LevKushnir LevKushnir

Thank you for reply.
I downloaded that file and installed it locally.
However, this error kept appearing.

Perhaps I have overlooked the following explanation.
Could you tell me if there is a specific procedure?

【Important!
Please note that the SAP Connector for Microsoft must be installed in the Windows Global Assembly Cache (GAC) to work properly. This can be done by selecting the appropriate option during the installation of the SAP Connector.】

→【install in the Windows Global Assembly Cache (GAC) 】
Does that mean I can’t install it by running the installer normally?

Go here and see all steps BAPI Functionality in UI Path - #18 by StefanSchnell

GAG is saying, that any application on your machine can use SAPNCO

Best regards, Lev

1 Like

I tried it on a PC with Microsoft Visual C++ 2010 x86 Redistributable installed, but the 【optional setup steps】screen did not appear.
I reinstalled Microsoft Visual C++ 2010 x86 Redistributable, but the same.
It was skipped to the installation confirmation screen.

Hi

Please

  1. Follow the official documentation

  2. Follow the guide from Stefan (post 18)

See both links above

Best regards, Lev

1 Like

@Haretoke

Hello Haretoke,
you installed .NET Connector 3.0 for .NET 2.0 x64,
but it is necessary to install .NET Connector 3.0 for .NET 4.0 x86.
Best regards
Stefan

2 Likes

@StefanSchnell good point! I missed this from the screenshot

Thanks, Lev

2 Likes

@StefanSchnell @Lev Kushnir
That was the cause !
I really appreciate all your help. Thank you so much !

regards

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.