When I add Microsoft Excel Object Library (reference Microsoft.Office.Interop.Excel), breakpoints placed in c# code stop working. And I have to debug using MessageBox.Show(). Is it a solution to make breakpoints work?
How to reproduce:
- Create a new SSIS package.
- Add a Script Task.
Edit the Script task with some simple code, for example:
// TODO: Add your code here
string test = "test"; MessageBox.Show("test " + test); Dts.TaskResult = (int)ScriptResults.Success;Place a breakpoint on MessageBox row, then launch the debug (F5). The breakpoint works!
- Edit the script task again, add a reference to Microsoft Excel Object Library 16.0 (COM Objects section).
- Try to debug again. The breakpoint doesn't work!
- You got it.
I'm using DataTools (Visual Studio 2015) on 32bit Windows 7, target framework is .NET Framework 4.5.
Is it a solution?Sure, usingMessageBox.Show()is a solution, but not the best one. You could also log to a file. Without some example code to demonstrate what you're doing, there's not much we can do. - Dan Wilson