TFS: How to fix the Red X of Death on the Report Folder in Team Explorer

March 13th, 2010 No comments

Awhile back, I upgraded our Team Foundation Server to 2008 SP1 and our SQL 2005 server to 2008.  It took a bit of finagling to get everything working right.  Google was my friend and I was able to solve all but one nagging issue.  Have you ever seen the little red “x” on your Report folder in Team Explorer?  He and I have been fighting for a few weeks.

I came across several forum posts that all seemed logical.  Here are the steps I took to get it fixed:

  1. Configure registry to use FQDN -> Edit each of the following registry keys accordingly:
    1. HKLM\Software\Microsoft\VisualStudio\9.0\TeamFoundation\ReportServer\443\Sites\BaseReportsUrl
    2. HKLM\Software\Microsoft\VisualStudio\9.0\TeamFoundation\ReportServer\443\<ProjectName>\ReportsService
    3. HKLM\Software\Microsoft\VisualStudio\9.0\TeamFoundation\ReportServer\80\Sites\BaseReportsUrl
    4. HKLM\Software\Microsoft\VisualStudio\9.0\TeamFoundation\ReportServer\80\<ProjectName>\ReportsService
  2. Configure connections in TFS
    1. Option 1:
      1. Browse to C:\Program Files\Microsoft Visual Studio 2008 Team Foundation Server\Tools
      2. Run TfsAdminUtil.exe configureconnections /view
      3. Ensure that ReportsUri is set to http://<ReportServerUrl>/Reports (or https for SSL)
        SET: TfsAdminUtil.exe configureconnections /reportsuri:http://<ReportServerUrl>/Reports
      4. Ensure that ReportServerUri is set to http://<ReportServerUrl>/ReportServer/ReportService.asmx (or https for SSL)
        SET: TfsAdminUtil.exe configureconnections /reportserveruri:http://<ReportServerUrl>/ReportServer/ReportService.asmx
    2. Option 2 (easier IMHO):
      1. Use SQL Management Studio to connect to your TFS SQL Server
      2. Run this query against the TfsIntegration database: SELECT * FROM dbo.tbl_service_interface
      3. Look for 2 records that look like these and make sure they’re accurate:
        ReportsService    http://<ReportServerUrl>/ReportServer/ReportService.asmx
        BaseReportsUrl    http://<ReportServerUrl>/Reports

At this point, I thought I was done.  The red x stared smugly into my eyes.  Alright, it must be server cache.  Reboot the server and restart VS.  He’s still there.  He’s laughing at me at this point.  I finally realized that the properties of that folder (in Team Explorer) still had the wrong url.  The cache was client side.  DIRTY!

You can clear you client cache like this:

  1. Close Visual Studio
  2. Browse to c:\users\%username%\appdata\local\microsoft\team foundation\2.0
  3. Delete the cache folder

Now launch Visual Studio and rejoice!

Cool Feature of Remote Desktop in Windows 7

March 11th, 2010 No comments

Windows 7 has changed the game when it comes to remote desktop.  Neowin.net blogged about the new features about a year ago.  Click here to check out their post. I, too, was blown away by what’s now possible in Remote Desktop.  Some of the new features include:

  • Windows 7 Aero support
  • Direct 2D & Direct 3D 10.1 application support
  • True multi-monitor support
  • RDP Core Performance Improvements
  • Multimedia enhancements
  • Media Foundation support
  • DirectShow support
  • Low Latency audio playback support
  • Bi-directional audio support

I noticed one, seemingly insignificant, but very cool new feature that wasn’t mentioned at Neowin.net.  Have  you ever used Remote Dekstop to get into a network…and then used it again to get to another computer within that network?  If so, you’ve probably noticed that the minimize bar at the top doubles over itself; making it next to impossible to minimize one remote machine without minimizing the other while in full-screen mode.  Remote Desktop now lets you slide the bar at the top; making it much easier to minimize one session to get to another.  Thanks Microsoft!  It hasn’t gone unnoticed and it’s appreciated!

Internet Explorer limits CSS and Script Resources to 30

March 5th, 2010 No comments

I ran into a weird bug recently that I hope no one else ever experiences.  I use Telerik’s Rad Controls for ASP.NET AJAX because they’re powerful, pretty and developer friendly.  I recommend them to ALL .NET developers.  I had just put together a server control that used several of Telerik’s controls and my own Rounded DIV Container control as well.  It looked great in all browsers.  I was happy.   I added another Rounded DIV to the page.  When I refreshed the page, all of my styles were gone.  I know the CSS is good, because I was using the control elsewhere.  Was it possible I had an unclosed tag somewhere?  I tried the page in Firefox…perfect, then Safari…perfect, then Google Chrome…perfect.

Scratching head…

At this point, I know it’s a browser issue, but I’m still not sure what’s causing it.  After digging around and playing with the Internet Explorer Developer Toolbar, I noticed that the page seemed to lose it’s style whenever there were more than 30 registers resources on a page (i.e. CSS & JavaScript file references).  I probably had too many CSS files as it was.  On top of that, I was dynamically referencing js files.  Telerik also register javascript and css files via the WebResource.axd (embedded .NET resources).

Here’s how you can check how many resources are registered for a given page:

  1. Check your markup
    1. Look for all instances of registered resources (CSS, JS, etc)
      <link id=”cssStyleSheet” rel=”stylesheet” type=”text/css” runat=”server” /> — each one of these counts as 1
    2. If you’ve got a lot of these, consider consolidating into fewer resources
  2. Use the IE Developer Toolbar, ChromeBug (Google Chrome) or FireBug (the best) to check for registered resources in WebResource.axd
    1. Firebug (ChromeBug is similar)
      1. Once the page is loaded, highlight the CSS tab and click the resource drop down list just below it
      2. Do the same thing on the “Script” tab (ASP.NET is close to 30! Watch out! :-) )
    2. IE Developer Toolbar
      1. In IE, press F12 to bring up the Developer Tools
      2. Click on CSS and count the items in the drop down list
      3. Do the same for Script

I hope you don’t have this many registered resources. :-)   But if you do, and things look weird in IE 7 and IE 8, now you know why.  Time to consolidate!

How to Recover Deleted TFS Files and Folders

March 3rd, 2010 2 comments

I recently went in search for a “how to” regarding file and folder recovery in Microsoft Team Foundation Server.  One of our project files was corrupted and removed its reference to an ascx file, but left the .cs and .designer.cs files behind; ultimately breaking the build on our continuous integration server.  Google doth continue to rock.  I quickly found a solution.   It’s relatively easy:

  1. In Visual Studio, click on Tools -> Options -> (make sure the “show all items” check box is checked) -> Source Control -> Visual Studio Team Foundation Server
  2. Check the “Show deleted items in the Source Control Explorer” check box
  3. Click “OK”
  4. In Team Explorer, open Source Control
  5. Then just right-click and click “Undelete” -> sooooo not a real word

Enjoy!

Sync Files and Folders Between Computers

February 6th, 2010 3 comments

I have one music library on my iMac (running Snow Leopard) and another on my MacBook Pro (BootCamp – running Windows 7 Ultimate).  My wife purchases music on the iMac and I purchase from my laptop.  Sometimes we use iTunes, other times we use Wal-Mart.com.  Hence the need for a sync utility.  I came across Microsoft’s Live Sync while looking for a platform agnostic utility to sync my music library.

Live Sync

Windows Live Sync is an application and web service used to synchronize files and folders across multiple computers and with multiple users.  You can sync up to 20 different folders with up to 20,000 files each.  It also provides a nice web interface for browsing your remote computers’ hard drives (don’t worry, it’s all encrypted).

You can invite friends to share/sync folders and grant permissions as readers, contributors or owners.

In theory, this should have worked great.  My problem was that I already had folders that were out of sync with each other.  Live Sync seemed to have a hard time with this.  It was also quite slow in syncing 10+ GB over the internet.

I use this to quickly and conveniently access files on my home network from anywhere in the world.  This could also be a great solution for musicians who are working on a project remotely.  It’s a user-friendly, FREE way to sync your music projects.

Live Mesh

Live Mesh is another cool Microsoft product that gives you all the features of LiveSync, but adds support for remote desktop (requires ActiveX) and 5GB of online storage (not much, eh?).  Microsoft describes Live Mesh like this:

With Live Mesh, you can synchronize files with all of your devices, so you always have the latest versions handy. Access your files from any device or from the web, easily share them with others, and get notified whenever someone changes a file.  Use Live Mesh to connect to your other computer and access its desktop as if you were sitting right in front of it.

I downloaded the Vista x64 version for Windows 7 and it worked fine.  Very cool…and has it’s place…but it still didn’t meet my needs for reasons mentioned earlier. Live Mesh boasts future support for mobile devices, but has been advertised as “Coming Soon” for about a year.

Home Brew

So, I learned about a couple nice utilities from Microsoft that run smoothly on Mac, but at this point I’ve decided to write my own folder sync utility in C#.  It’s a console app right now.  I have the following config settings available:

  • Local folder location
  • Remote folder location (supports UNC paths for network shares)
  • Copy from local to remote
  • Copy from remote to local
  • Enable verbose logging
  • Log file location
  • Append or overwrite log file
  • Overwrite files if source is larger – if there are files of different sizes with the same name in the same folder. This option will overwrite the destination file if the source file is larger
  • File types to exclude (I use this because I don’t want DS_Store files copied to Windows and I don’t want desktop.ini or .lnk files copied to the Mac)

So far so good.  I copied 10 gigs of files in 5000 directories (on a local 100Mbps network) in about 20 minutes.  This could come in handy if you need to sync a local folder with a network share at work.  Thoughts from the peanut gallery?  Should I turn it into a windows app and post it here for download?

Click here to check out a great blog post about Live Sync, Live Mesh and SkyDrive.