How to enable PDB files in Silverlight XAP?

Is there a way in VS 2008 to indicate that I want to include pdb files for all / some DLLs in the generated xap?

Background

We have created a Silverlight framework that is used by several projects with some basic controls and user interface functionality. These dll and pdbs frameworks are brought into projects via svn: externals in the lib folder. Silverlight applications refer to DLL files from the lib project folder, and Copy Local to True. When compiling, the dll is included in xap, but pdb is not. If I have a precondition (i.e. the ItemSource of the control is not set), then the dll framework is not executed, an error occurs. I have both CLR exceptions thrown and user excluded that were noted in the Exclusions dialog box in VS 2008. I did not report errors with the addition of VS 2008. Since the standard Application_UnhandledException handler does not warn of unhandled errors,if a debugger is connected and for some reason VS does not interrupt the error. If I manually enable pdbs in xap, VS will stop at the correct line, showing me an 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 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
+3
1

PDB XAP. , post-build action, .

, - PDB, . PDB , . , MIME- x-application/octet-stream.

+1

Source: https://habr.com/ru/post/1757741/


All Articles