none
Custom Control not loading TSWA

    Question

  • Hi,

      I'm using the multivalue control from codeplex. I have totally 3 instances of TSWA. The custom controls are loading fine on 2 instances of TSWA but not on the other. When i checked the log i found the below error.

    General: [Error, P 13016, T 13156/5, A 33711845, S uxpbur55mf1mpn55zvbpl555, 4/30/9 13:51:43.423] }
    General: [Error, P 13016, T 13156/5, A 33711845, S uxpbur55mf1mpn55zvbpl555, 4/30/9 13:51:43.423] { Unable to create workitem control 'MultiValueControl'.


    General: [Error, P 13016, T 13156/5, A 33711845, S uxpbur55mf1mpn55zvbpl555, 4/30/9 13:51:43.423] Exception: {
    Exception Message: Object reference not set to an instance of an object. (type NullReferenceException)

    Exception Stack Trace:    at Microsoft.TeamFoundation.WebAccess.WorkItemTracking.Controls.ControlFactory.CreateCustomControl(ControlDefinition controlDefinition)
       at Microsoft.TeamFoundation.WebAccess.WorkItemTracking.Controls.ControlElement.CreateWorkItemControl()
       at Microsoft.TeamFoundation.WebAccess.WorkItemTracking.Controls.ControlElement.BuildWebControl()

     }

    I have the wicc and the dll files copied to the right directory. Did someone ran into the same situation? If so, can you provide me a resolution if you have one.

    Thanks,
    Praveen.
    Thursday, April 30, 2009 1:57 PM

Answers

  • Hi Praveen,

    TSWA cannot load those work item controls that are designed to work with win forms work item editor. TSWA has its own custom control extensibility mechanism. When you install TSWA 2008 powertool there will be a SDK directory in install location. SDK folder has few work item custom control examples for Web Access. You can follow the same pattern to write your own multi value control based oon the code from CodePlex.

    Thanks


    Ahmet Ali AKKAS - MSFT
    Friday, May 01, 2009 5:09 PM

All replies

  • Hi Praveen,

    TSWA cannot load those work item controls that are designed to work with win forms work item editor. TSWA has its own custom control extensibility mechanism. When you install TSWA 2008 powertool there will be a SDK directory in install location. SDK folder has few work item custom control examples for Web Access. You can follow the same pattern to write your own multi value control based oon the code from CodePlex.

    Thanks


    Ahmet Ali AKKAS - MSFT
    Friday, May 01, 2009 5:09 PM
  • I got the control working. Thanks for you help.
    Friday, May 01, 2009 5:53 PM
  • Hi Praveen, i got the TSWA multivaluecontrol working (showing up on screen) for web access. But it is not saving or retaining values. Anything i need watch out for?
    Thursday, May 06, 2010 12:30 PM
  • For whoever is tearing their hair out trying to get this multivalue control work for Team System Web Access - here goes:

    1. Download Team System Web Access 2008 powertools and install it. You'll see a SDK folder inside the install. This contains code for sample custom controls targetting TSWA. Note that you have MultiValue control included in the source.

    2. You'll have to open this project in VS 2010 and change references to point to latest .NET framework assemblies from GAC and rebuild it. If you do not do this, you'll get null reference exceptions when you run the code in TSWA 2010.

    3. You'll have to change the code of MultiValueControl little bit. You'll have to put a call to EnsureInnerControls() first thing inside the method InitializeControl(). If you don't do this, the control won't save values.

    4. You'll have to open the web.config file of TSWA and put entries to let TSWA know where to look for custom controls. Like this:

    <webAccessSettings>
    <customControls>
          <searchPaths>
            <add path="~/App_Data/CustomControls"/>
          </searchPaths>
        </customControls>
      </webAccessSettings>

    And you'll have to copy your custom control dlls (from step 2 above) to the path specified in config file (step 4).

    4. Now you should be able to use MultiValue control in Team System Web Access 2010.

    I hope this helps someone who does not have to spend 2 days on this like i did.

    Regards,

    Sathish

    Wednesday, May 19, 2010 12:27 PM
  • Sashisme

    Question: How did you deal with the CSS changes from TSWA 2008 to TSWA 2010?  The Out of box multivalued control looks awful in TSWA.  I've been able to update some of the CSS calls but I not sure if I've found them all. 

     

    Thanks,

     

    BJHop


    Brian Jon Hop
    • Edited by BJHop Monday, June 07, 2010 7:35 PM book english
    Monday, June 07, 2010 7:29 PM
  • Is it possible to get the Microsoft.TeamFoundation.WebAccess.WorkItemTracking.Controls  assemblies from some location? I dont seem to have them in my GAC folder.The ones that are packaged with the TSWA SDK are version 9.x,

     I am developing the controls in a separate machine than the one in which TFS server machine. So I do not have access to GAC to reference the latest 10.0.0.0 assemblies.

    Friday, October 08, 2010 2:21 AM