Visual Studio 2017-2019 (Community, Professional, Enterprise and Standard) Extension for Epicor 10 Customization

Appologies, I was mistaken. I got the compiled files into client folder like this:


I did unblocked the files and another crash happened. Here is the log:

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.DirectoryNotFoundException
   at System.IO.__Error.WinIOError(Int32, System.String)
   at System.IO.FileSystemEnumerableIterator`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].CommonInit()
   at System.IO.FileSystemEnumerableIterator`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.String, System.String, System.String, System.IO.SearchOption, System.IO.SearchResultHandler`1<System.__Canon>, Boolean)
   at System.IO.Directory.GetFiles(System.String, System.String)
   at VSExtension.EpicorTWControl+<>c__DisplayClass15_0.<OutputHandler>b__1()

Exception Info: System.Reflection.TargetInvocationException
   at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[])
   at System.Delegate.DynamicInvokeImpl(System.Object[])
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

Seems like it can not reach the directory to my client folder ?

I managed to fix the previous issue. Then I tried to log into Epicor and got ā€˜Failed To Authenticate’. Any way to fix this ?

How are you authenticating? It only supports basic and SSO

I just enter username and password to log in to Epicor. Is that the basic way?

I got it fixed for now. Thank you for taking your time sir.

@josecgomez Thank you for sharing this tool.

I have a few questions relating to saving your code as you go. Unfortunately I was happily coding along for about an hour and VS2019c crashed. I lost all my work since the last time I did an Edit/Run on the ToolBox.

So my questions are:

What does the Upload Button do?
What does having the Auto Sync Up check box do?
Does the Save Button on VS2019 update a local copy of what you are working on if not where does it save the current updates?

I tried the Upload button a few times and I don’t know if it is doing anything.

Please tell me what would be the best practice to follow if I just want to capture my work as I go even if there are errors in it and it wont compile.

Thanks Jose!

How am I supposed to use Visual Studio to debug my code when I’m using the cloud and the editor that comes with it is so bad that I can’t break it and I have to throw an exception to locate it and that makes me spend too much time in development


Epicor Functions Maintenance :sweat_smile:

HI @josecgomez,

I’ve wanted to give your helper a try and I’m running into an issue. We are currently in 2023.1.5 so I’ve installed the CustomizationHelper2.2023.1.X. If I replace the System.Runtime.CompilerServices.Unsafe.dll, your helper is working but I can’t no longer start an Epicor Client and vice versa. Can you do something about it?

image

Here is the log error:
024-08-17 12:00:31.887 -04:00 [INF] ===========================================Application Launch==================================
2024-08-17 12:00:31.991 -04:00 [INF] Action was Add
2024-08-17 12:00:41.216 -04:00 [DBG] Created Temp Epicor Directory at: C:\Users\lfequet\AppData\Local\Temp\da8aa881-5b99-491e-80ed-e76c1ee357c1
2024-08-17 12:00:41.422 -04:00 [ERR] Failed to Login
System.TypeInitializationException: The type initializer for ā€˜Log’ threw an exception. —> System.TypeInitializationException: The type initializer for 'PerTypeValues1' threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) at System.SpanHelpers.PerTypeValues1.MeasureArrayAdjustment()
at System.SpanHelpers.PerTypeValues1..cctor() --- End of inner exception stack trace --- at System.SpanHelpers.IsReferenceOrContainsReferences[T]() at Microsoft.Extensions.Logging.LogValuesFormatter..ctor(String format) at Microsoft.Extensions.Logging.LoggerMessage.CreateLogValuesFormatter(String formatString, Int32 expectedNamedParameterCount) at Microsoft.Extensions.Logging.LoggerMessage.DefineScope[T1,T2](String formatString) at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.Log..cctor() --- End of inner exception stack trace --- at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.Log.BeginRequestPipelineScope(ILogger logger, HttpRequestMessage request) at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.<SendAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Ice.Cloud.ProxyBase1.d__61.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Epicor.Utilities.AsyncHelper.RunSync[TResult](Func1 method) at Ice.Cloud.ProxyBase1.Execute(String methodName, RestValueSerializerBase serializer, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut)
at Ice.Cloud.ProxyBase1.<>c__DisplayClass59_0.<CallWithCommunicationFailureRetry>b__0(Context _) at Polly.Policy1.<>c__DisplayClass32_0.b__0(Context ctx, CancellationToken ct)
at Polly.Retry.RetryEngine.Implementation[TResult](Func3 action, Context context, CancellationToken cancellationToken, IEnumerable1 shouldRetryExceptionPredicates, IEnumerable1 shouldRetryResultPredicates, Func1 policyStateFactory)
at Polly.RetryTResultSyntax.<>c__DisplayClass12_01.<WaitAndRetry>b__0(Func3 action, Context context, CancellationToken cancellationToken)
at Polly.Policy1.ExecuteInternal(Func3 action, Context context, CancellationToken cancellationToken)
at Polly.Policy1.Execute(Func3 action, Context context, CancellationToken cancellationToken)
at Polly.Policy1.Execute(Func2 action, Context context)
at Ice.Cloud.ProxyBase1.CallWithCommunicationFailureRetry(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, RestRpcValueSerializer serializer) at Ice.Cloud.ProxyBase1.CallWithMultistepBpmHandling(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, Boolean useSparseCopy)
at Ice.Cloud.ProxyBase`1.Call(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, Boolean useSparseCopy)
at Ice.Proxy.Lib.SessionModImpl.Login()
at Ice.Core.Session.GetSessionId(String asUrl, String companyId, String plantId)
at Ice.Core.Session.InitSessionMod(String asUrl, Boolean fwVerCheck, String companyID, String plantID, String sessionId)
at Ice.Core.Session.InitSession(Action setCredentials, String asUrl, Guid licenseTypeId, String pathToConfigurationFile, Boolean fwVerCheck, String companyID, String plantID, Boolean useChannelCacheForServices, String sessionID)
at Ice.Core.Session…ctor(String userID, String password, String asUrl, Guid licenseTypeId, String pathToConfigurationFile, Boolean fwVerCheck, String companyID, String plantID, Boolean useChannelCacheForServices, String sessionID)
at Ice.Core.Session…ctor(String userID, String password, Guid licenseType, String pathToConfigurationFile)
at CustomizationEditor.Program.GetEpiSession(CommandLineParams o) in C:\Users\jcgomez\source\repos\epicor-editor-helper\CommonCode\Program.cs:line 376

Where did you get the helper from?

Try this fix