8 Replies Latest reply on Feb 10, 2016 5:39 PM by s_hoskins_

    C# PI Datalink ResizeRange gives "specified cast is not valid" unhandled exception

    s_hoskins_

      My app is supposed to create PI datalink functions and then perform a resizerange to get the PI data.

      The app works fine for PI functions such as:

      =PIAdvCalcDat('JBR Operation'!$B$6,'JBR Operation'!$B$3,'JBR Operation'!$B$4,"1h","average","time-weighted",0,1,129,"oilsandspi")

       

      But the app gives an unhandled exception for PI functions with an expression, such as these:

      =PIExpVal("'21PIC880'+'21PIC880'*5.432","TODAY",1,"oilsandspi")

      =PIExpDat("'21PIC880'+'21PIC880'*5.432",ParamSheet!$B$1,"1/3/2016","1H",1,"\\oilsandspi")

       

      When the code runs the resizerange line I get an unhandled exception


      unhandledexception.jpg

      After I click "continue" the resizerange finishes correctly.

       

      How can I get the code to stop creating this exception when I have an expression?

       

      The code related to the resize:

       

       

              protected void SetPIFormula(ref Excel.Range currentFind)
              {
                  try
                  {
                              currentFind = currentFind.get_Offset(notes.ExcelRowShift, notes.ExcelColShift);
                              currentFind.Select();
                              notes.PIaddress = currentFind.Address;
                              currentFind.Formula = notes.piFormula;
                              currentFind.FormulaArray = currentFind.FormulaR1C1;
                              PerformResizeRange();
                  }
                  catch (Exception ex)
                  {
                      notes.AddComment(string.Format("There was a problem setting the PI formula {0}", ex.Message));
                  }
              }

       

       

       

              protected void PerformResizeRange()
              {
                  object addinName = "PI DataLink";
                  try
                  {
                      Microsoft.Office.Core.COMAddIn myAddin = excelApp.COMAddIns.Item(ref addinName);
                      myAddin.Object.SelectRange();
                      myAddin.Object.ResizeRange();
                      System.Runtime.InteropServices.Marshal.FinalReleaseComObject(myAddin);
                  }
                  catch
                  {
                      // do nothing
                  }
              }

        • Re: C# PI Datalink ResizeRange gives "specified cast is not valid" unhandled exception
          gregor

          Hello Sarah,

           

          I haven't tried your code but am looking at KB01035 - Recalculate a PI DataLink function without using the right-click menu.

          Can you please try setting a proper range as done with the sample in the KB?

          Also, what PI DataLink version are you using?

            • Re: C# PI Datalink ResizeRange gives "specified cast is not valid" unhandled exception
              s_hoskins_

              Thanks for replying.

               

              I am using PI Datalink 2015 v5.2.0.

               

              The C# code that I am using correctly sets the range to the top left cell of the output array range.  When the "specified cast is not valid" message pops up I click the "continue" button and the range is correctly resized and recalculated so it seems like there is something windows related just prior to the rangeresize function being handled.

                • Re: C# PI Datalink ResizeRange gives "specified cast is not valid" unhandled exception
                  gregor

                  Hello Sarah,

                   

                  I am sorry but I must have overlooked the semicolons at line end that would have told me that you are not using VBA. Is this a VSTO (Visual Studio Tools for Office) project?

                  PI DataLink 2015 runs in a separate application domain which could explain the exception that you are getting. Is your code working with previous versions of PI DataLink?

                    • Re: C# PI Datalink ResizeRange gives "specified cast is not valid" unhandled exception
                      s_hoskins_

                      This is a VS C# .NET 4.5 windows application.  The resizerange function is working correctly for all the PI functions where the tag is a cell reference or hardcoded, the resizerange generates the windows unhandled exception for functions that have a formula embeded but then the resizerange works after clicking "continue" in the exception popup, formulas such as:

                      =PIExpVal("'21PIC880'+'21PIC880'*5.432","TODAY",1,"oilsandspi")

                      =PIExpDat("'21PIC880'+'21PIC880'*5.432",ParamSheet!$B$1,"1/3/2016","1H",1,"\\oilsandspi")

                       

                       

                      thanks.

                        • Re: C# PI Datalink ResizeRange gives "specified cast is not valid" unhandled exception
                          gregor

                          Hello Sarah,

                           

                          So the issue happens only with PIExpVal() or PIExpDat() but not with PIAdvCalcDat() what indicates the issue is not a general access issue, right?

                          Can you maybe copy and paste the complete InvalidCastException? The screenshot you posted only has very few information and we may be able to find some additional details having the complete message.

                           

                          I haven't faced the issue you are experiencing but I also haven't tried yet to programmatically write PI DataLink functions into the cells of an Excel sheet. Would you be able to create a simple sample that can be used to reproduce the issue?

                            • Re: C# PI Datalink ResizeRange gives "specified cast is not valid" unhandled exception
                              s_hoskins_

                              So, the app reads through a spreadsheet and finds PHD formulas and then changes them to the best fit PI Datalink formula.  The app is basically parsing text and then creating a string to write to a cell in an excel spreadsheet.  Once the formula is written to the cell then the app performs the rangeresize.  I don't think sending an example of the PHD spreadsheet will help with this problem since after I click "continue" the rangeresize actually works.

                               

                              Below is the full text from the Unhandled Windows exception:

                               

                               

                              See the end of this message for details on invoking
                              just-in-time (JIT) debugging instead of this dialog box.

                              ************** Exception Text **************
                              System.InvalidCastException: Specified cast is not valid.
                                 at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
                                 at System.Windows.Forms.StringSource..ctor(String[] strings)
                                 at System.Windows.Forms.TextBox.SetAutoComplete(Boolean reset)
                                 at System.Windows.Forms.TextBox.OnHandleCreated(EventArgs e)
                                 at System.Windows.Forms.Control.WmCreate(Message& m)
                                 at System.Windows.Forms.Control.WndProc(Message& m)
                                 at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
                                 at System.Windows.Forms.TextBox.WndProc(Message& m)
                                 at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
                                 at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
                                 at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

                              ************** Loaded Assemblies **************
                              mscorlib
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
                                  CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
                              ----------------------------------------
                              Microsoft.VisualStudio.Tools.Office.Runtime
                                  Assembly Version: 10.0.0.0
                                  Win32 Version: 10.0.50903.0
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Runtime/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Runtime.dll
                              ----------------------------------------
                              System.Core
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
                              ----------------------------------------
                              System
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 4.0.30319.34238 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
                              ----------------------------------------
                              System.Configuration
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
                              ----------------------------------------
                              System.Xml
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
                              ----------------------------------------
                              Microsoft.VisualStudio.Tools.Applications.Hosting
                                  Assembly Version: 10.0.0.0
                                  Win32 Version: 10.0.50903.0
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Hosting/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Hosting.dll
                              ----------------------------------------
                              Microsoft.VisualStudio.Tools.Applications.Runtime
                                  Assembly Version: 10.0.0.0
                                  Win32 Version: 10.0.50903.0
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.dll
                              ----------------------------------------
                              System.Deployment
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 4.0.30319.34280 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Deployment/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
                              ----------------------------------------
                              System.Security
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 4.0.30319.34252 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Security/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Security.dll
                              ----------------------------------------
                              Microsoft.VisualStudio.Tools.Applications.ServerDocument
                                  Assembly Version: 10.0.0.0
                                  Win32 Version: 10.0.50903.0
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.ServerDocument/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.ServerDocument.dll
                              ----------------------------------------
                              System.Windows.Forms
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 4.0.30319.34251 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
                              ----------------------------------------
                              System.Drawing
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 4.0.30319.34270 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
                              ----------------------------------------
                              System.Xml.Linq
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
                              ----------------------------------------
                              Microsoft.Office.Tools
                                  Assembly Version: 10.0.0.0
                                  Win32 Version: 10.0.50903.0
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.Office.Tools/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.dll
                              ----------------------------------------
                              Microsoft.Office.Tools.Excel.Implementation
                                  Assembly Version: 10.0.0.0
                                  Win32 Version: 10.0.50903.0
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.Office.Tools.Excel.Implementation/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Excel.Implementation.dll
                              ----------------------------------------
                              Microsoft.Office.Tools.Common.Implementation
                                  Assembly Version: 10.0.0.0
                                  Win32 Version: 10.0.50903.0
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.Office.Tools.Common.Implementation/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Common.Implementation.dll
                              ----------------------------------------
                              Microsoft.Office.Tools.Common
                                  Assembly Version: 10.0.0.0
                                  Win32 Version: 10.0.50903.0
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.Office.Tools.Common/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Common.dll
                              ----------------------------------------
                              Microsoft.Office.Tools.Excel
                                  Assembly Version: 10.0.0.0
                                  Win32 Version: 10.0.50903.0
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.Office.Tools.Excel/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Excel.dll
                              ----------------------------------------
                              OSIsoft.PIDataLink.UI
                                  Assembly Version: 5.2.5640.16898
                                  Win32 Version: 5.2.5640.16898
                                  CodeBase: file:///C:/Program%20Files%20(x86)/PIPC/Excel/OSIsoft.PIDataLink.UI.DLL
                              ----------------------------------------
                              Microsoft.Office.Tools.Common.v4.0.Utilities
                                  Assembly Version: 10.0.0.0
                                  Win32 Version: 10.0.30319.1
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.Office.Tools.Common.v4.0.Utilities/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Common.v4.0.Utilities.dll
                              ----------------------------------------
                              OSIsoft.PIDataLink.Resources
                                  Assembly Version: 4.2.0.0
                                  Win32 Version: 5.2.0.0
                                  CodeBase: file:///C:/Program%20Files%20(x86)/PIPC/Excel/OSIsoft.PIDataLink.Resources.DLL
                              ----------------------------------------
                              OSIsoft.PIDataLink.AFData
                                  Assembly Version: 5.1.0.0
                                  Win32 Version: 5.2.0.0
                                  CodeBase: file:///C:/Program%20Files%20(x86)/PIPC/Excel/OSIsoft.PIDataLink.AFData.DLL
                              ----------------------------------------
                              WindowsBase
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll
                              ----------------------------------------
                              Microsoft.GeneratedCode
                                  Assembly Version: 1.0.0.0
                                  Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
                              ----------------------------------------
                              OSIsoft.AFSDK
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 2.7.5.7166
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/OSIsoft.AFSDK/v4.0_4.0.0.0__6238be57836698e6/OSIsoft.AFSDK.dll
                              ----------------------------------------
                              OSIsoft.PI.Configuration
                                  Assembly Version: 1.5.0.0
                                  Win32 Version: 1.5.0.67
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/OSIsoft.PI.Configuration/v4.0_1.5.0.0__c3309f0734ba2805/OSIsoft.PI.Configuration.dll
                              ----------------------------------------
                              OSIsoft.PI.Net
                                  Assembly Version: 1.5.0.0
                                  Win32 Version: 1.5.0.67
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/OSIsoft.PI.Net/v4.0_1.5.0.0__c3309f0734ba2805/OSIsoft.PI.Net.dll
                              ----------------------------------------
                              OSIsoft.PI.Net.Core
                                  Assembly Version: 1.5.0.0
                                  Win32 Version: 1.5.0.67
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/OSIsoft.PI.Net.Core/v4.0_1.5.0.0__c3309f0734ba2805/OSIsoft.PI.Net.Core.dll
                              ----------------------------------------
                              Microsoft.GeneratedCode
                                  Assembly Version: 1.0.0.0
                                  Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
                              ----------------------------------------
                              CustomMarshalers
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/CustomMarshalers/v4.0_4.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.dll
                              ----------------------------------------
                              System.Runtime.Serialization
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
                              ----------------------------------------
                              OSIsoft.PI.Configuration.PISDKRegDirectoryProvider
                                  Assembly Version: 1.5.0.0
                                  Win32 Version: 1.5.0.67
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/OSIsoft.PI.Configuration.PISDKRegDirectoryProvider/v4.0_1.5.0.0__c3309f0734ba2805/OSIsoft.PI.Configuration.PISDKRegDirectoryProvider.dll
                              ----------------------------------------
                              OSIsoft.PI.Resources
                                  Assembly Version: 1.5.0.0
                                  Win32 Version: 1.5.0.67
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/OSIsoft.PI.Resources/v4.0_1.5.0.0__c3309f0734ba2805/OSIsoft.PI.Resources.dll
                              ----------------------------------------
                              Microsoft.CSharp
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 4.0.30319.34209
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.CSharp/v4.0_4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll
                              ----------------------------------------
                              System.Dynamic
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 4.0.30319.34209
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Dynamic/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Dynamic.dll
                              ----------------------------------------
                              Anonymously Hosted DynamicMethods Assembly
                                  Assembly Version: 0.0.0.0
                                  Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
                              ----------------------------------------
                              System.ServiceModel
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel/v4.0_4.0.0.0__b77a5c561934e089/System.ServiceModel.dll
                              ----------------------------------------
                              SMDiagnostics
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/SMDiagnostics/v4.0_4.0.0.0__b77a5c561934e089/SMDiagnostics.dll
                              ----------------------------------------
                              System.IdentityModel
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.IdentityModel/v4.0_4.0.0.0__b77a5c561934e089/System.IdentityModel.dll
                              ----------------------------------------
                              System.ServiceModel.Internals
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel.Internals/v4.0_4.0.0.0__31bf3856ad364e35/System.ServiceModel.Internals.dll
                              ----------------------------------------
                              Microsoft.VisualStudio.Diagnostics.ServiceModelSink
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 11.0.50727.1
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualStudio.Diagnostics.ServiceModelSink/v4.0_4.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Diagnostics.ServiceModelSink.dll
                              ----------------------------------------
                              System.Web
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 4.0.30319.34280 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll
                              ----------------------------------------
                              Microsoft.GeneratedCode
                                  Assembly Version: 1.0.0.0
                                  Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
                              ----------------------------------------
                              OSIsoft.AF.UI
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 2.7.5.7166
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/OSIsoft.AF.UI/v4.0_4.0.0.0__6238be57836698e6/OSIsoft.AF.UI.dll
                              ----------------------------------------
                              System.ServiceProcess
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ServiceProcess/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.ServiceProcess.dll
                              ----------------------------------------
                              OSIsoft.AF.Asset.DataReference.PIPoint
                                  Assembly Version: 2.0.0.0
                                  Win32 Version: 2.7.5.7166
                                  CodeBase: file:///C:/ProgramData/OSIsoft/AF/PlugIns/4.0/OSIsoft.AF.Asset.DataReference.PIPoint.dll
                              ----------------------------------------
                              System.Data
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
                              ----------------------------------------
                              Accessibility
                                  Assembly Version: 4.0.0.0
                                  Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
                                  CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
                              ----------------------------------------

                              ************** JIT Debugging **************
                              To enable just-in-time (JIT) debugging, the .config file for this
                              application or computer (machine.config) must have the
                              jitDebugging value set in the system.windows.forms section.
                              The application must also be compiled with debugging
                              enabled.

                              For example:

                              <configuration>
                                  <system.windows.forms jitDebugging="true" />
                              </configuration>

                              When JIT debugging is enabled, any unhandled exception
                              will be sent to the JIT debugger registered on the computer
                              rather than be handled by this dialog box.