Skip navigation

Monthly Archives: February 2007


CAB Presenter Event Handlers Fire Multiple Times When Using SCSF
Fix: SCSF - Dispose Bug does not clean up instances

Purpose

This document explains how to fix the problem associated with the Guidance Packages not providing the correct code in the dispose method. 

Symptoms

The presenter will not be disposed when you disposed the view. For example, if you had an event handler in the presenter, it will fire as many times as the number of times you displayed the view.

Resolution

  • Open the file called View.Designer.cs.t4 located at “C:\Program Files\Microsoft SCSF\GuidancePkg\bin\Templates\Items\View”.
  • Change the dispose method to contain the following code: protected override void Dispose(bool disposing)  {   if (disposing)   {   if (_presenter != null && _presenter.WorkItem != null)   _presenter.WorkItem.Items.Remove(this);   if (_presenter != null)   _presenter.Dispose();if (components != null)   components.Dispose();   }base.Dispose(disposing);  }

This will cause the template to insert that code on NEW run Recipe code, but your existing code will need to be changed by hand.

Fix For Slow or Hanging Visual Studio Using CAB, SCSF and SourceSafe

Author: Jeff Noble

FOR INSTRUCTIONS ON THE MAY 2007 RELEASE CLICK HERE!!Purpose 

This document explains how to fix the problem associated with CAB, Guidance Packages, Visual Studio and SourceSafe (vss).

Symptoms

There are a couple of symptoms associated with this problem. They are depicted below:

  1. Opening a SourceSafe bound CAB solution takes excessive time.
  2. Right Clicking folders in a CAB/VSS solution causes an extended wait and blinks the hourglass cursor continually.
  3. Closing a CAB/VSS solution or Visual Studio when a CAB/VSS solution is loaded. Causes Visual Studio to hang with a blinking hourglass cursor.

Resolution

  1. Open GuidanceAutomation.sln (located in Microsoft SCSF).

  2. Open the file ViewTemplateReference.cs. You can find it in the SmartClientDevelopment project in the References folder.

  3. Locate the ContainsReference method and comment out (or remove): vsProject.Refresh();

  4. Build the solution

You must register the package after you build it. I chose to replace the existing package. That way it always uses my change as I consider it a bug for my purposes.

You can replace the original by copying the SmartClientDevelopment.dll to the debug directory in the SCSF Guidance package. To do this:

  • Copy SmartClientDevelopment.dll from “C:\Program Files\Microsoft SCSF\GuidancePkg\Source\SmartClientDevelopment\bin\Debug”
  • Overwrite the existing dll in “D:\Program Files\Microsoft SCSF\GuidancePkg\bin”

Follow

Get every new post delivered to your Inbox.