Solve package errors in VS2005 help window
Frank Dzaebel, created at: 16.2.2006, last updated:  4.4.2006
Category: Troubleshooting, .NET-Version: 1.1, [Download (Sources)]

If Betas of Visual Studio 2005 are not de-installed as recommended by Microsoft (or Dotfuscator 3.0 was installed), there can arise error messages like 'Package could not be loaded' in the Help-Window (DExplore.exe). The main support of this types of errors can be found at Aaron Stebner's WebLog. Beside other tools, Aron developed a fsnap-tool, which could list all necessary informations of the GAC-Assembly-DLLs.

This is an application, that puts the results of fsnap in a DataGrid, so sorting is enabled.
By the way - one can use this app for other automation of program-outputs, or simply learn how to redirect program output, while letting the GUI be responsive.




Filling the Grid dynamically:

Here a snippet where the DataGrid is filled dynamically from a TextBox (txtStatus) - datasource, while splitting the lines und tabulators ("\t") in different values and assigning them to the DataTable (dt) which eventually becomes the DataSource of the grid. In txtStatus.Lines[0] are all columnheader names, because the values comes from a CSV file:

#region FillGrid ===========================
DataTable dt = new DataTable("Assemblies");
DataRow dr; int i,j;

private void FillGrid()
{
  try
  {
    if (txtStatus.Lines.Length == 0) return;
    MsgError("Filling the Grid ...");
    Cursor = Cursors.WaitCursor;
    dt = null; dataGrid1.DataSource=dt;
    dt = new DataTable("Assemblies");
    string[] cols = txtStatus.Lines[0].Split('\t');
    foreach (string col in cols) dt.Columns.Add(new DataColumn(col));

    foreach (string line in txtStatus.Lines)
    {
      cols = line.Split('\t');  
      dr = dt.NewRow();
      for (i=0; i<cols.Length; i++) dr[i]=cols[i];
      if (dr[0] != null) dt.Rows.Add(dr);
    }
    dt.Rows[dt.Rows.Count-1].Delete();
    dt.Rows[0].Delete();
    dataGrid1.DataSource = dt;
    MsgError("Grid is filled.", Color.DarkGreen);
  }
  catch (Exception exp)
  {
    MsgError(exp.Message, Color.Red);
  }
  finally
  {
    btnExecute.Text = "Execute";
    Cursor = Cursors.Default;
  }
}

#endregion