Is there a way in VS 2008 to specify I want to include pdb files for all/some dlls in the xap generated?
Background
We have written a Silverlight framework that is used by multiple projects with some base UI controls and functionality. These framework dlls and pdbs are brought into projects via svn:externals into a lib folder. The Silverlight applications reference the dlls from the project's lib folder with Copy Local set to True. When compiled, the dll is included in the xap, but the pdb is not. If I have a precondition (i.e. ItemSource of a control is not set) of the framework dll is not satisfied, an error is thrown. I have both "thrown" and "User-Unhandled" CLR Exceptions checked in the Exceptions Dialog within VS 2008. With VS 2008 attached, I get no errors reported. Since the standard generated Application_UnhandledException handler does not alert unhandled errors if a debugger is attached and for some reason VS does not break on the error. If I manually include the pdbs in the xap, VS stops on the correct line showing me the error.
Private Sub Application_UnhandledException(ByVal sender As Object, ByVal e As ApplicationUnhandledExceptionEventArgs) Handles Me.UnhandledException
' If the app is running outside of the debugger then report the exception using
' the browser's exception mechanism. On IE this will display it a yellow alert
' icon in the status bar and Firefox will display a script error.
If Not System.Diagnostics.Debugger.IsAttached Then
' NOTE: This will allow the application to continue running after an exception has been thrown
' but not handled.
' For production applications this error handling should be replaced with something that will
' report the error to the website and stop the application.
e.Handled = True
Deployment.Current.Dispatcher.BeginInvoke(New Action(Of ApplicationUnhandledExceptionEventArgs)(AddressOf ReportErrorToDOM), e)
End If
End Sub