User948188685 posted
I have a .NET Core 3.1 Windows(Worker) Service with an assembly reference to a .NET Standard 2.1 Class Library
. (2 separate solutions each with their own project. In a nutshell, I have a windows service project calling another compiled DLL to gain additional functionality (call happens every 60 seconds).
When the Worker Service makes a call to methods in the DLL everything is fine until the DLL tries to create an instance of:
System.Configuration.RegexStringValidator IsValidString = new RegexStringValidator(@"[Some Regular Expression Here]");
As soon as this line is encountered, the debug window of the Worker Service states:
Exception thrown: 'System.IO.FileNotFoundException' in System.Private.CoreLib.dll
All ability to step through and debug both projects stop if the DLL even contains this line of code. Neither putting try/catch blocks around RegexStringValidator statement in the DLL nor calling line of code worker service allow the debugger to
continue stepping through the two programs. The windows service timer keeps running but all breakpoints and debugger no longer work for the current iteration
The latest Microsoft.Configuration libraries have been installed into both project with NuGet. Some sites says this error is a false positive. That is loaded as part of the default of any project using .NET Core/Standard and is handed even though the
output window reports the error. However, because the debugger wont step out of the DLL and allow the Worker process to report more info on the error, Im at a lost of what do to.
I even installed Microsoft.NETCore.Runtime.CoreCLR hoping it might fix the issue. It did not
I know what the error should mean, but not sure why OR how to fix it. Im at my wits end
Help is greatly appreciated.