Welcome to Team System Rocks Sign in | Join | Help

Enabling Process Template IntelliSense in Visual Studio 2005 using xsi:schemaLocation

Rob Caron pointed me out to an article on FTP Online by William Wen entitled "Enable IntelliSense in Your Documents" (you need to register to read the second part of the article - it's definitely worth it). In his article, William describes how you can use xsi:schemaLocation to get the XML Editor to automatically download your schema. Using his technique, I got IntelliSense to work on my process template files (although I am still searching for a technique to load them in locally).

Here are the steps I took to enable IntelliSense in my process template file (ProcessTemplate.xml):

1. Open ProcessTemplate.xml in Visual Studio 2005
2. Click on XML > Create Schema
3. Edit the newly generated ProcessTemplate.xsd schema file
4.
In the xs:schema node, add the following:

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/1999/XSL/Transform http://www.fooserver.com/ProcessTemplate.xsd"

5. Save the file and upload it to a web server (in this example, I use a fictional server name fooserver.com). For example: http://www.fooserver.com/ProcessTemplate.xsd 

6.
Change the ProcessTemplate node in ProcessTemplate.xml to indicate the following:

<
ProcessTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/1999/XSL/Transform http://www.fooserver.com/ProcessTemplate.xsd">

Now whenever you load in ProcessTemplate.xml in Visual Studio 2005, you'll get IntelliSense. Not the most elegant way of enabling IntelliSense, but it works. The search continues...

posted by jldavid | 2 Comments

Problems Enabling Process Template IntelliSense in Visual Studio 2005

A couple of days ago, Rob Caron posted about how to author Work Item Types with IntelliSense in Visual Studio. You can download the process template schema files from the following link: http://msdn2.microsoft.com/en-us/library/ms194967.aspx

Typically, all you need to do is add all the .xsd files into the C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas directory. For some reason, I haven't been able to get IntelliSense to work with the process template xml files. For example:

The only options that are coming up include:

!--
![CDATA[
?

To troubleshoot the issue, I took a look at Aaron Stebner's blog post on how to configure the Visual Studio 2005 IDE to use custom XSD files for IntelliSense. I still can't get it working, and I suspect the issue is related to the schema namespaces. I found a way to temporarily get around the issue. Follow these steps:

  1. Load in one of the Process Template files in Visual Studio 2005
    (for example, ProcessTemplate.xml)
  2. Test if IntelliSense works.
  3. If not, click on XML > Create Schema
  4. A schema file will be generated in a separate window
  5. Return to your XML file. IntelliSense will now work on your process template file
    (as shown below)

If anyone has additional insight, or has encountered similar problems, feel free to post. If I work out a fix, I'll post it right away.

posted by jldavid | 2 Comments

Troubleshooting "TF50608: Unable to retrieve information for security object"

Since I haven't posted in a while, I decided to post a triple header. One of my clients encountered the following error while trying to implement Continuous Integration (CI). Even when he tried to manually launch a build using the same Team Project, the problem persisted:

I've been watching a lot of CSI recently - so I've decided to pull a Gil Grissom and "find the evidence".

The problem is that the project tries to access a resource that is no longer accessible. Team Foundation Server uses the Classification Service to track items such as work items.

The first thing I verified was that the build functionality worked on other Team Projects. The answer was yes - and eliminated the possibility that the root of the problem was the service itself. I then knew that the problem was localized at the Team Project level.   

The next question I asked was "What would make a resource and security object disappear?". Deleting it of course - however, the project was there in plain sight on the server and from experience, I knew that you couldn't have two Team Projects with the same name on the same server.

On a hunch, I asked the client if they had deleted the Team Project. To my surprise, they answered yes. Case solved.

They deleted the Team Project and somehow recreated it with the same name. The problem is, once you delete a Team Project, it isn't really deleted. There are portions of the project (including version control code and work items) that are perpetually stored in the Team Foundation Data Warehouse (for auditing purposes and as a design feature). When the client managed to recreate the project, they still had links to "phantom" objects.

Unfortunately, for all intents and purposes, the client's Team Project is corrupted. The client created a new Team Project and everything worked out fine.

posted by jldavid | 1 Comments

Displaying Work Items on an ASP.NET 2.0 Web Page

A lot of the people I've met in the past year have requested code that demonstrates how to display work items on a webpage. I've created an ASP.NET 2.0 sample from my upcoming book Professional Team Foundation Server which I will share with you today. 

There are a couple of really interesting elements to this code - first of all, it has no code behind. The sample was built completely using declarative code. The second thing you will notice is that it doesn't contain any hooks using the Work Item Tracking Object Model. There are a couple of reasons for this: first of all, the WIT OM approach can be quite slow, especially if you are pulling in a lot of work item data. I opted to directly query the relational table [TfsWorkItemTracking].[dbo].[WorkItemsLatest].There are also a lot of security settings that need to be put into place in order to allow the Work Item Tracking OM to access a Web page. Since we are using SQL queries, we don't have to worry about the restrictions. FYI, the WIT OM Web configuration setttings are documented on Naren Datha's blog: http://blogs.msdn.com/narend/archive/2006/07/29/682032.aspx

<%@ Control Language="C#" ClassName="WIT" %>
 
<asp:GridView AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="ID" EnableSortingAndPagingCallbacks="True" ID="GridView1" DataSourceID="SqlDataSource1"
runat="server" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" Font-Bold="False" Font-Names="Arial" Font-Size="Small" GridLines="Vertical">
  
<Columns
>
    
<asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="True" SortExpression
="ID">
      
<ItemStyle Font-Names="Arial" Font-Size="Small"
/>
      
<HeaderStyle Font-Bold="True" Font-Names="Arial" Font-Size="Small"
/>
    
</asp:BoundField
>
   
<asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title"
>
    
<ItemStyle Font-Names="Arial" Font-Size="Small"
/>
    
<HeaderStyle Font-Bold="True" Font-Names="Arial" Font-Size="Small"
/>
     
</asp:BoundField
>
  
<asp:BoundField DataField="WIType" HeaderText="Type" SortExpression
="WIType">
    
<ItemStyle Font-Names="Arial" Font-Size="Small"
/>
    
<HeaderStyle Font-Bold="True" Font-Names="Arial" Font-Size="Small"
/>
  
</asp:BoundField> 
 
</Columns
>
 
<FooterStyle BackColor="#CCCCCC" ForeColor="Black"
/>
  
<RowStyle BackColor="#EEEEEE" Font-Names="Arial" Font-Size="Small" ForeColor="Black"
/>
  
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White"
/>
   
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center"
/>
  
<HeaderStyle BackColor="#000084" Font-Bold="True" Font-Names="Arial" Font-Size="Small" ForeColor="White"
/>
   
<AlternatingRowStyle BackColor="#DCDCDC"
/>
</asp:GridView
>
<asp:SqlDataSource ConnectionString="<%$ ConnectionStrings:TfsWarehouse %>" ID="SqlDataSource1" runat="server" SelectCommand="SELECT [ID], [Title], WIType = [Work Item Type] FROM [TfsWorkItemTracking].[dbo].[WorkItemsLatest]"></asp:SqlDataSource>

You'll notice that the SqlDataSource has a reference to ConnectionStrings.TfsWarehouse. What you need to do is now add the following lines of code after the AppSettings block in the web.config file:

<connectionStrings>
<
add name="TfsWarehouse" connectionString="Server=TFSRTM;Integrated Security=True;Database=TfsWorkItemTracking;Persist Security Info=True" providerName="System.Data.SqlClient"
/>
</
connectionStrings>

To install the application, simply create an ASP.NET 2.0 Web page, add the GridView code into your Web form, edit your Web.config file and add the connection string (don't forget to change the TFSRTM server name to your own server name). This is a basic example but gives you a hint of the power of the technique - why limit it to work items? You can potentially display any data stored in the Team Foundation Data Warehouse easily and quickly. Here is a screenshot of the end result:

posted by jldavid | 0 Comments

Tip: Creating Code Snippets for Custom Build Tasks

As I mentioned on my other blog, I am currently working on some Team System courseware. While developing code snippets for the Team Foundation Build content, I encountered an interesting problem. Here is the original code I came up with for the code snippet:

<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <
CodeSnippet Format="1.0.0"
>
    <
Header
>
      <
Title>Custom Build Code Snippet</Title
>
    </
Header
>
    <
Snippet
>
  
   <Code Language="XML"
>
     <![CDATA[
      
<UsingTask TaskName="BuildTask.CustomTask" AssemblyFile="C:\BuildTask.dll" />
        <Target Name="BeforeDropBuild">
          <BinSize SourceDir="$(SolutionRoot)" />
        </Target>
      </Project>
     ]]>
     </
Code
>
   </
Snippet
>
 </
CodeSnippet
>
</
CodeSnippets>

When I tried importing the code snippet (Tools > Code Snippet Manager > Import) and then use it within the TfsBuild file, I got the following error:

The source of the error is the dollar sign. The code snippet framework within Visual Studio 2005 recognizes dollar signs ($) as variable identifiers. My code snippet requires a dollar sign as a means of identifying a path in Team Foundation Version Control.

To alleviate the problem, I defined a variable called "dollarsign" and assigned it the value of "$". The following updated snippet code fixes the problem:

<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <
CodeSnippet Format="1.0.0"
>
    <
Header
>
      <
Title>Custom Build Code Snippet</Title
>
    </
Header
>
    <
Snippet
>
      <
Declarations
>
        <
Literal
>
         <
ID>dollarsign</ID
>
         <
ToolTip>Dollar Sign</ToolTip
>
         <
Default>$</Default
>
       </
Literal
>
     </
Declarations
>
     <
Code Language="XML"
>
     <![CDATA[
      
<UsingTask TaskName="BuildTask.CustomTask" AssemblyFile="C:\BuildTask.dll" />
        <Target Name="BeforeDropBuild">
          <BinSize SourceDir="$dollarsign$(SolutionRoot)" />
        </Target>
      </Project>
     ]]>
     </
Code
>
   </
Snippet
>
 </
CodeSnippet
>
</
CodeSnippets>

posted by jldavid | 2 Comments

Joining Microsoft Canada as a Developer Evangelist

I've recently accepted an offer to join the great team at Microsoft Canada in the role of Developer Evangelist! This new position will be a great challenge and a lot of fun as far as I can tell. I'll be bringing in my experience as a former Microsoft MVP and user group leader in the role, and I'm looking forward getting deeply involved with the developer community in Canada!

Update: Noah Coad has posted about my new position here.

posted by jldavid | 6 Comments

TechEd 2006

I've been at TechEd 2006 all week and it has been a blast. Here are some of the highlights:

Party with Palermo: Got the opportunity to hang out with great friends including Jeff (of course), Noah Coad, Mark Dunn, Brendon Schwartz, Guy Barrette, Mario Cardinal, and Nick Landry. Eric Cote was absolutely hilarious - he called his SPOT watch a "woman repeller" and walked up to a complete stranger and asked her if she thought the watch was "sexy" (which elicited laughs all around the table). Later in the week (during the TechEd keynote address), Eric ran for the stage and got to hug Mary Lynn Rajskub (Chloe from the show "24"). Here is a photo of Eric (featured left) - take a look at the keynote (by clicking here). Got the opportunity to talk to Lorenzo Barbieri - had a long interesting chat with him on MSF. Watch the photos on Flickr right here.  

Book Signing: On Tuesday, Noah Coad, Chris Bowen and I had the opportunity to do a book signing at the TechEd bookstore to promote our new book Professional Visual Studio 2005 Team System on WROX Press/Wiley Publishing! We were joined by Sam Guckenheimer (signing his book "Software Engineering with Visual Studio 2005 Team System" on Addison-Wesley) and Richard Hundhausen (promoting his book "Working with Visual Studio Team System" by Microsoft Press). We had over 25 people show up - a great turnout. When I checked yesterday, we sold over 28 out of 40 books. A special thanks to Rob Caron and Jan Shanahan for helping setting up the event! Check out the photo gallery on Flickr.

Birds of a Feather - Switching to Team System: I had a good turnout for my Birds of a Feather talk on migrating to Team System. We discussed a variety of topics including version control, build, and even work items and testing. Chris Menegay and Barry Gervin had a very animated discussion about branching techniques. All in all, it turned out to be a great success.

The highlights can be found on my Flickr site:
http://www.flickr.com/photos/jldavid/

More to come... 

posted by jldavid | 3 Comments

Professional Visual Studio 2005 Team System Now In Stores!

I recently learned that my new book "Professional Visual Studio 2005 Team System" is available to purchase in stores!

I co-wrote it alongside a great group of authors including Microsoft product team members and seasoned pros. It has quite a few highlights including the first chapter I've ever seen on how to use Domain Specific Languages (DSL) written by Darren Jefford.

A huge thanks goes out to Noah Coad, Chris Bowen, Darren Jefford, Erik Gunvaldson, Tony Loton, and last but not least - the blogfather of Team System,  Rob Caron for their invaluable contributions to the book. It took a momentous effort to get this book out on the shelves. Each of these individuals deserves a lion share of the credit.Another huge thank you for the staff at Wiley Publishing, and especially Bob Elliott, Bill Barton and Brian MacDonald.

Run - don't walk and pick up a copy. If you want a handle on all the features of Team System, this is the book to get.

posted by jldavid | 2 Comments

MSDN Load and Web Webcast Tomorrow

I'll be delivering a webcast called "Effective Web and Load Testing in Visual Studio Team System" tomorrow at 12:00 PM PDT. It's part of the pre-TechEd webcast series. You can learn more about all available MSDN webcasts at: http://msdn.microsoft.com/events/

Click here to sign up for the webcast!

Looking forward to your participation and comments.

Correction: fixed the timezone - PDT not EST

posted by jldavid | 1 Comments

Tip: Embedding Queries Within Your Work Items

I stumbled on a way to incorporate work item queries within a work item. In order to do this you must first modify a .wiq file. To obtain a .wiq file, download a process template from the Team Portal using the Process Template Manager (Team > Team Foundation Server Settings > Process Template Manager). Once it has been downloaded, your queries can be found in the MSF for \WorkItem Tracking\Queries directory. Here is a sample of the standard "All Work Items" query (found in AllWorkItems.wiq):

<?xml version="1.0" encoding="utf-8"?>
<WorkItemQuery Version="1">
    <Wiql>SELECT [System.Id], [System.WorkItemType], [System.State], [System.AssignedTo], [System.Title] FROM WorkItems
        WHERE [System.TeamProject] = @Project
        ORDER BY [System.WorkItemType], [System.Id]
    </Wiql>
</WorkItemQuery>

Simply change @Project to the name of the Team Project associated to the work item. For example:

WHERE [System.TeamProject] = "MyTeamProject"

Save your query  file, go into work item tracking, select a work item, click on the File Attachments tab and then attach the .wiq file. The limitation is that if you don't rename @Project to a valid Team Project on your Team Foundation Server you will get an error. To launch the query, open up the work item and double-click on the .wiq file.

One of the uses of this technique is to quickly get to your tasks by scenario. Feel free to post if you have any questions about the technique or any comments. 

posted by jldavid | 2 Comments

Tip: Editing Your Process Guidance Using FrontPage 2003

In the following blog post, Randy Miller explains how to customize process guidance by checking in/out files from the SharePoint Team Portal site: http://blogs.msdn.com/randymiller/archive/2006/04/11/573525.aspx

Another direct way of accomplishing this is by connecting to your Team Portal using FrontPage 2003. Here are the steps:

1) In FrontPage, select File > Open Site
2) Type in the URL of your Team Portal (for example: http://tfs/sites/MyTeamProject)
3) You may be prompted for a password. Enter credentials that has administrator rights on the SharePoint portal
4) On the left hand side, you will see a list of the Documents on your site.
5) Expand Process Guidance, then expand Supporting Code
6) You will now see a list of all your HTML-based process guidance files
7) Double-click on any of them to edit the file

posted by jldavid | 2 Comments

Participated in Team Edition for Software Developers and Testers Chat

On April 19, I had the privilege and honor of participating in a VSTS chat alongside great people from the product team. Thanks to Mickey Gousset, you can read the chat transcript right here: http://teamsystemrocks.com/blogs/team_system_news/archive/2006/04/19/822.aspx

It's great to see the respect Microsoft has for their MVPs. A big shout out goes to Noah Coad (a former C# MVP) and David Kean for helping organize the chat.

posted by jldavid | 1 Comments

TechEd 2006 - Birds of a Feather: Switching Over to Team System?

I just got word that my Birds of a Feather (BoF) session at TechEd 2006 got accepted! The session will be taking place on Tuesday, June 13, 2006 at 9:00 PM. Here is the abstract:

Switching Over to Team System?
Have you or your company considered (or made the move) to adopt Team System? This session will allow participants to discuss and share the challenges and success stories in extending, customizing and migrating existing assets and code to this new SDLC suite of tools.
Intended Audience: Developer

In case you are not familliar with a Birds of a Feather, the session is a discussion, not a presentation, lecture or breakout session. The key to a successful BoF is to get people engaged and participating. Birds of a Feather sessions fill a niche in the conference – it is an opportunity for attendees to connect and interact directly with one another, to be part of their community.

Hope to see you there!

posted by jldavid | 2 Comments

Team Foundation Server for IT Professionals

A few weeks back, I started a series of blog posts on Team Foundation Server as a guest blogger on the Microsoft TechNet Canada IT Pro blog (http://blogs.technet.com). What's unique about this series is that it touches on non-developer topics - namely installing and administering Team Foundation Server from an operational perspective. I've started with Security, but you can bet I'll cover other topics.

Team Foundation Server for IT Professionals: Security
Part 1 - http://blogs.technet.com/canitpro/archive/2006/03/23/422967.aspx
Part 2 - http://blogs.technet.com/canitpro/archive/2006/04/04/424094.aspx

Let me know what you think and if you would like to see other topics

posted by jldavid | 1 Comments

Team System Developer and Tester Tool Chat

Is there a feature that you wish was in the Team System development and testing tools, or is there a feature that needs improvement? This is your chance to influence the future of Team System v.2.0!

Team System Developer and Tester Tool Chat

Join the chat on April 19th, 2006 10:00am - 11:00am Pacific time.

The Team System Developer and Tester Tools (Unit Testing, Web Testing, Load Testing, Profiling, Code Analysis (FxCop and PREFast) and Code Coverage) is having a MSDN chat on Wednesday, April 19th, at 10:00am (PST, 1pm EST) at http://msdn.microsoft.com/chats.

There will be PMs, Devs and QAs from the team to answer your questions.
http://msdn.microsoft.com/chats

posted by jldavid | 0 Comments
More Posts Next page »