Method Directive Error - Unable to use Custom Code

Yeah we’re lost too. Mine was fixed with a simple install of the .NET 6 SDK.

It seems this symptom can manifest many ways.

Hello,
I wanted to provide an update. I have un-installed and re-installed Epicor a third time. I have not found a fix for my problem yet.

My problem keeps getting worse. Epicor Pilot had an update over the weekend. We are a multi-tenant customer and receive all updates.
image
Now I am not able to get into the Part, Part Tracker, and Part Transaction History Tracker. Each screen errors out with the following message:

System Information

==================

AppServer Connection: https://ausmtsPilot102.epicorsaas.com/SaaS201Pilot
Form Name: ShellMenuForm
Customization Name:
Menu ID:
Software Version: 4.2.200.11

============

Application Error

Exception caught in: Erp.UI.PartEntry

Error Detail

============
##!Message:##! Could not load file or assembly ‘Erp.Contracts.BO.Part, Version=11.2.200.0, Culture=neutral, PublicKeyToken=5d3fa3c7105d7992’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
##!Program:##! Erp.UI.PartEntry.dll
##!Method:##! TransactionLoad

Client Stack Trace

==================
at Erp.UI.App.PartEntry.PartTransaction.TransactionLoad()
at Ice.Lib.Framework.EpiTransaction.createTransaction()

This problem is with my workstation. I can go to another workstation and login using my credentials and have no errors. I am also a system administrator and there was mention that it is affecting system admins.
I am at a lose on how to fix this issue and advice would be helpful.

At this point I would cut my losses and reinstall Windows, just to be honest.

reinstall cient, you have obsolete Erp.Contracts.BO.Part, probably you did not logoff before upgrade?

Hi Olga,
Can you please give me step by step directions for the re-install of the client? I believe that I logged off of Epicor Live and Epicor Pilot. We still use Epicor classic display and I just closed the window with the X in the upper right corner. I know of no way to “log off” on the classic display, other than the red X.

When I did the re-install of Epicor Live and Pilot, in Epicor Live I can open the Part, Part Tracker, and Part Transaction History screen but in Epicor Pilot I have the errors. I completed the re-install all at the same time.
Thank you for the quick response,
Heide

I don’t have the steps. In your case, you should start from empty client folder - delete it or rename for reference. Probably copy from the working machine and check if that will resolve the issue with BPM references you have.

Hi Olga,
The process that I used in the past was to un-install Epicor and then copy the client files from the working computer to my computer. One step that we forgot was to delete all files on the C:\ProgramData\Epicor. When I reinstalled Epicor this time, I used https://download.epicorsaas.com.
I have the Part, Part Tracker, and Part Transaction History screens working. But I still have the long error message for the Updatable BAQ. Here is a small part of the error message:

Input mapping expression for ‘Part.Company’ field is invalid: Predefined type ‘System.Void’ is not defined or imported
The type ‘Object’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’.
Predefined type ‘System.Object’ is not defined or imported
Predefined type ‘System.String’ is not defined or imported

Regards,
Heide

so you are back at the beginning.
what are your local .net installations. What does this command return:

dotnet --info

also, just a guess, do you have nuget packages in %userprofile%.nuget\packages ?

Here is the response from dotnet --info
.NET SDK (reflecting any global.json):
Version: 6.0.405
Commit: 27ab36058b
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19045
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.405
global.json file:
Not found
Host:
Version: 6.0.13
Architecture: x64
Commit: 1af80ba017
.NET SDKs installed:
6.0.405 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.13 [C:\Program Files\dotnet\shared\Microsoft.AspN
etCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore
.App]
Microsoft.NETCore.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.
App]
Microsoft.NETCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore
.App]
Microsoft.NETCore.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore
.App]
Microsoft.NETCore.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore
.App]
Microsoft.NETCore.App 6.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore
.App]
Microsoft.WindowsDesktop.App 6.0.13 [C:\Program Files\dotnet\shared\Microsoft.
WindowsDesktop.App]

I also checked the %userprofile%.nuget\packages and found this

<?xml version="1.0" encoding="utf-8"?>

Hi Olga,
Sorry, the nuget information was cut short. Here is the nuget information:
add key=“nuget.org” value=“https://api.nuget.org/v3/index.json” protocolVersion=“3” /
Thank you for the help,
Heide

i don’t see anything interesting. What does “dotnet --info” return on working machine?

For anyone searching for solutions, please read this thread:

I have a feeling your answer is there. Folder names/versions may be slightly different.

Y’all can thank @Olga

1 Like

For anyone looking through this thread…I have a solution from Epicor which WORKED!!.

ISSUE
When trying to enable UBAQs/BPMs on certain workstations we get errors but other workstations have no issues.

ERROR
Predefined type ‘System.Void’ is not defined or imported
Predefined type ‘System.String’ is not defined or imported

RESOLUTION
This issue has been identified to be an issue with the .net install.

  1. Run the following from a command prompt
    dotnet ––info

Example Output:
.NET runtimes installed:
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

  1. The issue has been typically the Microsoft.NETCore.App 6.0.9 folder which is empty and needs to be deleted
2 Likes

You needed to delete the folder C:\Program Files\dotnet\shared\Microsoft.NETCore.
App as it is empty and Epicor goes there to find stuff (which isnt there)

1 Like

As I said… y’all can thank @Olga :rofl:

2 Likes

I’ve marked the first post that contained the solution as answer. Cheers @klincecum.

As long as no one has to deal with this bug, I’m good with whatever :slight_smile:

I’m not trying to take credit for anything, but having trawled through this thread I never once came across the solution I was given by Epicor themselves, which was to delete a specific folder. Maybe I missed it, but the fact is the more times a solution is posted, the more chance people will find it. If @Olga posted this already, then I missed it…I just hope anyone with this issue has resolved it now…and moved on like I have.

1 Like

No worries lol, it’s not in this thread, but the one linked.

I linked to that thread where people could see the process and solution, in case there was anything slightly different, like if they had a different folder name etc, then they could see how it was figured out.

I don’t care about the solution credit either.

Wish I had found that when I was looking….hate relying on Eoiccare for solutions. However, TBF, on this occasion they were able to resolve my issue, so I got there in the end. Thanks.