Method Directive Error - Unable to use Custom Code

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