Visual Studio Code Extension for Epicor 10 Customization

Transfer Order Pick List… It is called from a button on a dashboard. Not sure if that has anything to do with it, but other forms with customisations open ok…

Just tried doing it for a customisation on the Sales Order Backlog params screen and the same issue. You can navigate to it through the customisation list, but nothing is returned.

What version of Epicor.

10.2.400.16 Getting a bit old now…

Are there libraries available for 10.2.600.X?
My visual studio crashes everytime i tru to run. However, I’m guessing its cause my clients are 10.2.600. Would using Epicor Public Cloud make a difference?

I haven’t compiled for 600… I’ll try to publish those asap.

@John_M_Sasser I just published the helper library for 600 Available

https://josecgomez.com/files/CustomizationHelper.10.2.600.X.zip?0.43.0

BTW I recommend you use the Visual Studio (propper) extension instead of the VS Code one

2 Likes

Can you add support for version 10.700.x?

Really Excellent Work @josecgomez …Thanks for making developers life easy…i installed everything as per your documentation but i am unable to open the epicor customization getting this below error .

i had already installed the extension omnisharp (ms-dotnettools.csharp).Kindly help me to resolve this issue.

Possible unrelated, possibly not useful. Definitely backup project before trying.

Thanks found solution

2 Likes

@yusuff I recommend you try the Visual Studio (Big Boy) Extension instead the visual studio code and omnisharp are just not quite there yet I did it as an experiment.

But I am actively maintaining the one for Visual Studio Proper

Okay, I got the extension installed and configured for epicor 2022.2.x,

I was able to select my customization and create the project in visual studio just fine.

Problem I am having is debugging with dnSpy, the debugger just doesn’t launch,
(I can launch it standalone)

When I attempt to debug, the epicor “pick your customization” dialog comes up (because I do have developer mode on) , I select my version, and leave “Debug in Visual Studio” turned off.

I then get an unhandled exception, it appears to be related to dnSpy, here are the details:
(notice the “CommonCode.EpicorLauncher.RunDnSpy(CommandLineParams o)” line
which calls “System.IO.Directory.GetFiles(String path, String searchPattern)”
and the exception is on the null “path” parameter

************** Exception Text **************
System.ArgumentNullException: Value cannot be null.
Parameter name: path
at System.IO.Directory.GetFiles(String path, String searchPattern)
at CommonCode.EpicorLauncher.RunDnSpy(CommandLineParams o) in C:\Users\jcgomez\Source\Repos\epicor-editor-helper\CommonCode\EpicorLauncher.cs:line 453
at CustomizationEditor.NonModalWokIt.btnDebug_Click(Object sender, EventArgs e) in C:\Users\jcgomez\Source\Repos\epicor-editor-helper\CustomizationEditor_2022.2\NonModalWokIt.cs:line 99
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

My dnSpy is located in “C:\Programs\dnSpy”, and that is what I have the extension configured as for the location of dnSpy

Any thoughts ?

thanks, Scott

The DNSpy debugger feature I haven’t upgraded in a while. DNSPy got a pretty large re-write recently, I’m not sure is going to work without some significant effort.

what is your technique for debugging then ?

using the visual studio debugger (selecting the checkbox when the form starts) and keeping the VS instance with the extension in it running so you can synch your changes with epicor ?

Yeah I debug using Epicor’s “native” debugger when I need to.

You can debug directly in Epicor, so there isn’t really a reason to do that.

If you use dotPeek you can build .pdb files and your own Symbol Server and then point Visual Studio to your symbols and you can then step-into Epicor Client side code as well, it will auto-decompile it, or you just buy .NET Reflector and use the VS Plugin.

Slightly confused about a couple of things, (testing/playing with upload/download/autosynch)…

  1. upload/download appears to work fine (assuming I remember to save first)
    except that if the toolbox is open it doesn’t work at all
    if I hit download or upload the toolbox just flashes and nothing happens
    intentional ?

  2. What is the difference between “Edit/Run” and “Run (Test)” ?
    it appears maybe that “Run (Test)” executes with debug mode off
    (cuz I can’t select my customization when form opens)
    and “Edit/Run” executes with debug mode on
    (this gives me the opportunity to check the “Debug in Visual Studio” checkbox)

  3. Does/should auto synch work with “Run (Test)” ?
    auto synch works find with “Edit/Run” but does not with “Run (Test)”
    (I applied a change in VS, saved it, did a “Run (Test)”, then closed the form
    and opened it in Kinetic manually and my change was not there)

Thanks, Scott

Are you using this on Visual Studio code or Visual Studio (big boy)

The Visual Studio Code version I quit working on because at the Time VS Code didn’t work great with C#

There Visual Studio version though is newer and probably has some fixes on the extension side

While most things are driven from the helper library there are some things in the IDE extension that are needed which didn’t work great in VS Code

I am using Visual Studio 2017 (big boy)
I think I understand now why it appeared to me that “Run (Test)” didn’t apply my changes
I tried a message box and that worked, it just doesn’t persist the changes once the form is closed

Seems like that’s an intentional feature,
it gives you the option to do a quick test of some changes without persisting them on the epicor side

I’m all good with it now - thanks !

Scott

1 Like