System.Windows.Forms.ni.dll fails to run program

Bryan Willimon 1 Reputation point
2022-11-10T17:21:56.537+00:00

My program is running on my host Win10 PC, but not on my remote Win10 PC. I don't know what the difference is between the two. I compiled the code using .NET 4.5 framework on VS2017. The binaries range from C# to C++/CLI. Both copies of the software, that are on each PC, have the exact same libraries and files. The .config and .xml files that accompany each .dll/.exe file are identical. Other google results state that this is a .NET issue without any extra information. Every time I try to run it, the event log spits out:
Faulting application name: PillTraining.exe, version: 5.1.0.0, time stamp: 0x636c2b1f
Faulting module name: System.Windows.Forms.ni.dll, version: 4.8.4550.0, time stamp: 0x62ccef24
Exception code: 0xc0000005
Fault offset: 0x00000000002f7509
Faulting process id: 0x15a4
Faulting application start time: 0x01d8f525e2d1f0b3
Faulting application path: C:\Program Files\Universal Robotics\Neocortex\PillTraining.exe
Faulting module path: C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\System.Windows.Forms\4ef7722680f0f79e12b1e79c0e445158\System.Windows.Forms.ni.dll
Report Id: ee10d519-c5f2-4319-8397-86a9fbff4412
Faulting package full name:
Faulting package-relative application ID:

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,820 questions
.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
321 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,117 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bryan Willimon 1 Reputation point
    2022-11-15T17:47:45.56+00:00

    This error shows to have occurred b/c one of the <appSettings> in the .exe.config file contained a "Data Line Escape" character.

    ex. <add key="photoAlias" value="SC:bb16 1920 1080" /> , where the blocks are DLE.

    Once the DLE character is removed, then the application runs as intended.

    0 comments No comments