ExcelReaderFactory.cs not found

2019-08-11 12:03发布

问题:

I'm quite new to c# and visual studio, and I'm having problems with libraries. With nuget I installed "ExcelReaderFactory" and everything work as it should, I can see all the classes and so on, but when I try to compile I get an error message "ExcelReaderFactory.cs not found". The thing that puzzles me is that the library is a .dll, so why is it even looking for an .cs file?? I hope you can clear it for me. Thank you!

回答1:

This is caused by an uncaught exception happening in an external library in binary form. The uncaught exception causes the debugger to jump in and try to find the line of code which caused it but because you don't have the source for ExcelReaderFactory it will ask for the .cs file (just in case you do have the code somewhere). Nothing to worry about.

The solution here is to try to catch the previously uncaught exception caused by your external library inside your code. You can find the type of exception by looking at the Output Window.



标签: c# dll nuget