Community & Support
Skip Navigation LinksHome / Announcements / Forums / TFS Work Item Manager and Project Dashboard: TFS Work Item Manager > WorkItemStore Threw an Exception error

Not answered WorkItemStore Threw an Exception error

Feed from this thread
  • Shawn avatar

    Posted on Sep 22, 2011 (permalink)

    I have just installed the Work Item Manager on to my Windows 7 machine.  ( It's a new Thinkpad 410s with 4GB ram. ) I have Visual Studio 2010 Ultimate with SP1 and FP2 installed on my workstation and I point to an upgraded 2008 to 2010 TFS server.

    When I open the Work Item Manager application, I click on the CONNECT button, select my project in TFS ( I can see all of my projects, ) I get the following error:

    "The type initializer for 'Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore' threw an exception."

    I checked the various XML files in the default config folder under Program Files.  I noticed the TaskBoardSettingsScrum2010.xml file had an error in the spelling of Acceptance - so I fixed both instances of those. ( It was spelled Acteptence both times. ) 

    I do have custom workflows in almost all of my work items types. Also - in looking at the xml files, the WorkItemTypes are almost all different names. Is that the problem?  

    E.g. The TaskBoardSettingsAgile.xml file contains the following:

      <WorkRemainingFieldName>Remaining Work</WorkRemainingFieldName>
      <WorkItemTypes>
        <SelectableStringInfo Item="Bug" IsSelected="true" />
        <SelectableStringInfo Item="Quality of Service Requirement" IsSelected="false" />
        <SelectableStringInfo Item="Task" IsSelected="true" />
        <SelectableStringInfo Item="Scenario" IsSelected="true" />
        <SelectableStringInfo Item="Risk" IsSelected="false" />
      </WorkItemTypes>
      <States>
        <string>Active</string>
        <string>Resolved</string>
        <string>Closed</string>
      </States>
    </TaskBoardSettingsInfo>

    We have Bugs and Tasks, but our names for the others are:

     Requirement
     Issue
     Feature Request
     Test Case
     Shared Test Step
     User Story

    And each of these has a modified work flow.  Can I just change these entries to match our TFS implementation and think that it might work?  Or is there another file or set of files that I have modify to get this working?

    Thanks for the help!

    Reply

  • Joel Joel admin's avatar

    Posted on Sep 23, 2011 (permalink)

    Hi Shawn,

    The are two cases where we've seen the "type initializer" error.  The first is when you don't have Team Explorer 2010 installed.  However, the WIM installer should have checked for that and not allowed you to continue if it wasn't found.   Also, I'm pretty sure that VS 2010 Ultimate installs Team Explorer 2010 by default so I would be quite surprised if you didn't have it.

    The second case where we've seen it is if you install Team Explorer 2010 after applying a VS service pack.  The can cause strange behaviour in Team Explorer.  The workaround for this was to re-install the server pack which should then fix up Team Explorer.

    I would also be curious to see where exactly you get this error so if you could find the error in WIM log file and post it here, that would be great.  The log file can be found here: {My Docs}\Work Item Manager 2010\WIM-log.txt.


    You should be able to update the TaskBoardSettingsAgile.xml to change the defaults.  WIM uses these default settings whenever it thinks you are using a project created with the "Agile" (Microsoft) template.  It can only make a best guess though and the way that it guesses is by checking to see if all the default work item types for that template are present in your project.  You can add work item types and it'll still work, but if you take any away or rename some it won't know which template you are using and will consider your project to be "custom".  Custom projects don't get any default values applied which means you are forced to choose a lot of settings yourself. 

    By the looks of it, you started off with an "Agile" project and then added the Feature Request and Requirement work item types.  I'm hoping that you didn't rename 'Shared Steps' to 'Shared Test Step' because that will throw off our logic and prevent WIM from correctly identifying your project as an Agile project.  In this case the TaskBoardSettingsAgile.xml file won't be used and you'll be stuck having to set everything up from scratch.  Renaming this work item type could also cause Test Manager to break too.


    I hope this info help and thanks for catching that spelling error, we will fix it up.

    Regards,
    Joel
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

    Reply

  • Shawn avatar

    Posted on Sep 26, 2011 (permalink)

    Hi Joel,

    Thanks for the reply.  I do have ultimate with Team Explorer and do have the latest SP's installed for VS.  I can try to re-apply the SP's and see if this helps.

    I didn't rename the Shared Steps so we're good there.

    Here is my WIM-log.txt:

    2011-09-23 10:06:49,725 [8088] [1] INFO  IRC.Gear.WorkItemManager.Wpf.App - Application Starting.   
    2011-09-23 10:07:10,662 [8088] [1] INFO  IRC.Gear.WorkItemManager.Common.TfsConnection - TFS Connection error.  System.TypeInitializationException: The type initializer for 'Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore' threw an exception. ---> System.IO.FileLoadException: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
       at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore..cctor()
       --- End of inner exception stack trace ---
       at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore..ctor(TfsTeamProjectCollection teamProjectCollection)
       at IRC.Gear.WorkItemManager.Common.TfsConnection.GetStoreAndProject(WorkItemStore& store, Project& project, TfsTeamProjectCollection projectCollection, String projectName)
       at IRC.Gear.WorkItemManager.Common.TfsConnection.ShowConnectionDialog(WorkItemStore& store, Project& project)
       at IRC.Gear.WorkItemManager.Common.TfsConnection.ConnectToTeamFoundationServer(String serverAddress, String projectName, Boolean throwExceptionOnError)
     
    2011-09-23 10:07:48,116 [8088] [1] INFO  IRC.Gear.WorkItemManager.Wpf.App - Application Shut Down.   

    Any thoughts?

    Reply

  • Shawn avatar

    Posted on Sep 28, 2011 (permalink)

    Hi again,

    I re-applied the SP1 for Visual Studio and I still have the same error.  Here are the results in the wim-log.txt file.  It says that additional configuration info is needed.  I'm not sure what I'm seeing here.  I was able to successfully start the application on another machine so this may be the environment we're talking about.  But I don't have a clue what it can be.

    Thanks for your help...

    2011-09-26 16:27:37,913 [8088] [1] INFO  IRC.Gear.WorkItemManager.Wpf.App - Application Starting.   
    2011-09-26 16:27:44,492 [8088] [1] DEBUG IRC.Gear.WorkItemManager.Wpf.MainWindow - Successfully loaded layout. Layout string:
    <?xml version="1.0" encoding="utf-8"?><RadDocking><DocumentHost><RadSplitContainer><Items><RadPaneGroup SelectedIndex="-1"><Items /></RadPaneGroup></Items></RadSplitContainer></DocumentHost><SplitContainers><RadSplitContainer Dock="DockedLeft" Width="200"><Items><RadSplitContainer Orientation="Vertical"><Items><RadPaneGroup SelectedIndex="0"><Items><RadPane SerializationTag="AreaIterationFilterDockPane" IsDockable="True" Title="Area/Iteration Filters" Header="System.Windows.Controls.StackPanel" CanDockInDocumentHost="False" /></Items></RadPaneGroup><RadPaneGroup SelectedIndex="0"><Items><RadPane SerializationTag="WorkItemLinksDockPane" IsDockable="True" Title="Work Item Links" Header="System.Windows.Controls.StackPanel" CanDockInDocumentHost="False" /></Items></RadPaneGroup></Items></RadSplitContainer></Items></RadSplitContainer><RadSplitContainer Dock="DockedRight" Width="200"><Items><RadSplitContainer Orientation="Vertical"><Items><RadPaneGroup SelectedIndex="0"><Items><RadPane SerializationTag="ViewExplorerDockPane" IsDockable="True" Title="Work Item Queries" Header="System.Windows.Controls.StackPanel" CanDockInDocumentHost="False" /></Items></RadPaneGroup><RadPaneGroup SelectedIndex="0"><Items><RadPane SerializationTag="AggregateGraphDockPane" IsDockable="True" Title="Aggregate Graph" Header="System.Windows.Controls.StackPanel" CanDockInDocumentHost="False" /></Items></RadPaneGroup></Items></RadSplitContainer></Items></RadSplitContainer></SplitContainers></RadDocking>.   
    2011-09-26 16:27:59,904 [8088] [1] INFO  IRC.Gear.WorkItemManager.Common.TfsConnection - TFS Connection error.  System.TypeInitializationException: The type initializer for 'Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore' threw an exception. ---> System.IO.FileLoadException: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
       at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore..cctor()
       --- End of inner exception stack trace ---
       at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore..ctor(TfsTeamProjectCollection teamProjectCollection)
       at IRC.Gear.WorkItemManager.Common.TfsConnection.GetStoreAndProject(WorkItemStore& store, Project& project, TfsTeamProjectCollection projectCollection, String projectName)
       at IRC.Gear.WorkItemManager.Common.TfsConnection.ShowConnectionDialog(WorkItemStore& store, Project& project)
       at IRC.Gear.WorkItemManager.Common.TfsConnection.ConnectToTeamFoundationServer(String serverAddress, String projectName, Boolean throwExceptionOnError)
     
    2011-09-26 16:28:02,669 [8088] [1] INFO  IRC.Gear.WorkItemManager.Wpf.App - Application Shut Down.   
    2011-09-26 16:28:02,670 [8088] [5] INFO  IRC.Gear.WorkItemManager.Common.UserSettings - User Settings file changed (C:\Users\shpierson\Documents\Work Item Manager 2010\UserSettings.xml).

    Reply

  • Joel Joel admin's avatar

    Posted on Sep 29, 2011 (permalink)

    Hi Shawn,

    Thanks for posting the error message here.  We have not seen the "mixed mode assembly" error before and I'm not sure why exactly you are receiving it because WIM has no mixed mode assemblies.  However, from the reading I've done it seems that you should be able to solve this by adding the following to your configuration file:

    <configuration>
    ...
      <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0"/>
      </startup>
    ...
    </configuration>

    The name of the configuration file is WIM.exe.config and is in the install folder which is usually C:\Program Files (x86)\Telerik\Work Item Manager 2010.

    Regards,
    Joel
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

    Reply

Back to Top

Skip Navigation LinksHome / Announcements / Forums / TFS Work Item Manager and Project Dashboard: TFS Work Item Manager > WorkItemStore Threw an Exception error