Console.WriteLine():
does not work when debugging a Class library, since there is no console in a Class Library.
So, the "right" way to do this is to create a Debug build and then use
System.Diagnostics.Debug.WriteLine();
To debug your code you then
- Create a debug build
- In the project properties tab set the "Start Action" to "Start external program"
- Set the path of the external program to the path to the Excel executable.
- Set some breakpoints in your C# code.
- From within the IDE start debugging.
- An Excel instance will be created and you will then hit any breakpoints and step into the code.
No comments:
Post a Comment