Can’t Create a New Team Project

We recently upgraded our Team Foundation Server 2008 servers to TFS 2010 and migrated to new hardware. One of the decisions made by our DBA’s was to move SQL Server Reporting Services and Analysis services onto a separate box from the Application Server. The installation went relatively fine, but several users who used to be able to create new Team Projects received the following error:

TF218027: the following reporting folder could not be created on the server running SQL Reporting Services.

It turns out that in addition to adding rights in TFS, you must also add rights for that user to Reporting Services. I found a question on StackOverflow with the solution. Error TF218027 when creating a Team Project in TFS 2010

Mercurial (hg) Pull Does Not Show New Changes

Just a quick note. After doing an hg pull, make sure you do an hg update to begin working on the most recent changeset. That’s five minutes I’m never getting back. I am a little terrified that I have been working on Mercurial for over a month now and haven’t run into this yet. I wonder what else I don’t know I am doing wrong yet.

Fixing Blog Post Titles in WordPress

One of my many low priority annoyances with this blog is that the theme that I am using places the blog name in front of the post or page title. Not a huge deal, but when these pages get indexed by Google or Bing, the search results show JamesWampler.com and then the actual title of the post. I spend quite a bit of mental energy trying to name my posts with good search terms in them, so I actually want the post title to display most prominently.

Not a big deal to fix. I found a post describing how to pass parameters into the wp_title() method to adjust how the blog name is beiong displayed. Open the header.php file located at /wp-content/themes/your-theme-name/ and paste the following line over the existing <title> line.

<title><?php wp_title('-',true,'right'); bloginfo('name'); ?></title>

This will change you theme to display all posts and pages with the page title on the left and the blog name on the right. Now all I need to do is wait for Google and Bing to re-crawl the site and update the titles.

Scratching My Own Itch

Last summer, my wife had a great idea. She wanted to start her own business from home, selling environmentally friendly baby products. She has spent hours and hours looking for products for our twins, and was frustrated that there wasn’t a website out there that offered green options for products she was looking for. BeeGreenBaby.com was born.

Being a professional web developer (and a sucker) I offered to help her build the website and run it, so she could focus on the business: managing inventory and finances and fulfilling orders. Each of us went merrily on our way, her planning out the financial aspects of out little enterprise, and myself looking for an e-commerce application that would serve as the backend for her store

When I made the offer to set up her website, I figured I would end up doing a little research, spending a few weeks creating a custom design for whatever turn-key product I ended up choosing, then spending a couple of hours a week tweaking and going over Google Analytics and creating new promotional images for sales. What I ended up with was a seven month long slog through the world’s worst open source e-commerce system, Magento E-Commerce

At the beginning, my wife asked me why I didn’t just build the website myself. Why did I need to use a third-party application? I laughed patronizingly and told her that an application like Magento would handle all the things I knew from experience take a long time to develop, like proper security, integration with third party api’s for payment processing and shipping, updates and patching, and a vibrant community for purchasing add-ins. I told her we would end up getting the site done much quicker and with better quality then we would if I tried to build an e-commerce site from scratch part-time. All I can say is this was a BIG, BIG, BIG mistake. Wow! Huge. I’m actually crying a little bit right now, just thinking about it.

If I made a list of everything about Magento that I hate, this post would be 600 pages long and my wrists would ache. But that intense, white-hot hatred is fueling my decision to rebuild the entire site in ASP.NET MVC. I started working on the rewrite a little over a month ago, and am hosting the source code on BitBucket. The new BeeGreenBaby.com is being developed using ASP.NET MVC 2, NHibernate and jQuery and compared to my experience on Magento, is extremely exciting. My last couple of posts on Mercurial have been related to this work, and I intend to write about some of the issues I have been dealing with migrating an existing site off of Magento/PHP/Linux and onto a custom built ASP.NET MVC site, hopefully running on Mono and MySQL.

Configure Mercurial (hg) to Use a Proxy Server

My laptop is behind our corporate firewall for most of the day, so being able to do an hg push/pull against bitbucket.org fails because it isn’t hitting or proxy server. To setup Mercurial to use a proxy server, edit your hrgc file in the .hg folder of your repository and add this section:

[http_proxy]
host = foo.bar:8000
password = password
user = username

Just change the values to your proxy server hostname and port, username and password.

Why is my .hgignore not ignoring?

After almost an hour of tweaking my .hgignore file trying to figure out why it was not, in fact, ignoring ANY of the file types and folders I told it to, I discovered that .hgignore should be in the root of the repository, not in the .hg folder. I suppose this makes sense if you want to source control and share this file across machines or developers, but the temptation to put a file starting with .hg into the .hg folder was simply too great to resist. Sigh.

My First Week with Mercurial (hg)

I haven’t completely disrupted my programming life in a couple of days now, so I have decided to make the switch from Subversion to Mercurial for my personal source control needs. Don’t worry TFS, you are still my number one choice for partially solving my professional source control needs.

There is nothing really driving my change away from Subversion except the huge buzz around Distributed Version Control. My projects are not large or distributed and I don’t branch and merge frequently, so I am looking at Mercurial as a training opportunity more than a way to scratch an itch. The only real pain point I have with my home Subversion server is that I have to manage my own backups, and I could find a svn host if it was really that big of a timesink.

Initial Thoughts

  1. It’s a good thing that I started working more in the command line last year setting up automated builds, otherwise I might find this black screen weird.
  2. –m is my friend. I find the whole “add your comment to this file in notepad and then save it” thing very counter-intuitive.
  3. BitBucket.org is cool, but is intermittently slooooooooow. Like fifteen minutes to push a single changeset slow. Plus, I created my account with OpenID and it took four very sloooooow failed pushes to realize that my username and password were not my OpenID username and password. Which actually makes sense now that I have thought about it, but drove me crazy for the better part of an hour.
  4. I really need to figure out how to use DiffMerge as my diff tool. My eyes are not used to reading code in an 80×25 window.

End of the Week Thoughts

  1. I kind of like not having to right-click around in Windows Explorer to check-in files. I realize I didn’t have to use TortoiseSVN, and that I could have and still can use the command line for Subversion, but it seems like too much effort to go back now. ;)
  2. Console is much better then the standards Windows command prompt. Being able to cut and paste easily, change color themes and open multiple tabs makes using the command line much more friendly. Make sure to adjust your keyboard shortcuts to Ctrl+C and Ctrl+V for cutting and pasting.
  3. I adjusted my mercurial.ini to use DiffMerge as my diff tool. I haven’t had to work through a merge yet, but it is much easier for me to compare diffs in DiffMerge then at the command prompt.
  4. I didn’t configure Mercurial to exclude my bin and obj folders as well as the some of the user specific files that Visual Studio generates so I had to go back through and remove them later. I found this answer on StackOverflow for a list of files and folders to exclude. I currently have this defined per repository in the .hgignore file, but I will probably review it and add it to my mercurial.ini file.
  5. I haven’t had a chance to work in a team environment yet, so I am a little concerned about the workflow around branching and merging. This might be because I am still a little uncomfortable working without a GUI to hold my hand.

My overall impression is a sort of good-natured apathy. Mercurial is new, therefore interesting, yet not obviously better than Subversion for my situation. I have already migrated my projects from Subversion to Mercurial so I’ll keep using it. BitBucket.org is nice, and I don’t have to worry about maintaining my own backups and keeping a SVN server running.

Adding the NHibernate Schema Files to Visual Studio 2010

Since I can never remember the steps on how to do do this, if you need to add the Schema Definition files (.xsd) from NHibernate to Visual Studio 2010, here are the steps you need to follow:

  • Download the latest version of NHibernate
  • Copy nhibernate-configuration.xsd and nhibernate-mappng.xsd to C:\Program Files\Microsoft Visual Studio 10.0\Xml\Schemas\
  • Restart Visual Studio if it is already open.

This is based off any article I found here on how to configure the xsd files in Visual Studio 2005. Pretty much the same steps, but a different folder.

If you want to configure this at the project level, take a look at this article on NHForge.com

Broken Network Hyperlinks in Word 2003

I am putting together a Word document of all the software that needs to be installed on our new developer machines. I included hyperlinks to the setup files or the folders on our network so people could just click through each item in the document to run the installer for that item. Basically, I have a document with about 40 Hyperlinks like this: \\server\folder\to\installer\files\setup.exe

Every time I save the document, Word changes the Hyperlinks by removing the \\server\ and adding ..\..\..\..\ in front of them. VERY ANNOYING! Basically, Word is trying to save the link as a relative link and screws up the formating of it every time I save. Microsoft has a support article describing how to turn off using off relative links in Word 2003, 2007 and 2010.

Steps to Turn Off Relative Hyperlinks in Word 2003

  1. Click on Tools | Options
  2. Select the General Tab, then click the Web Options button.
  3. Click on the Files tab.
  4. Uncheck the Update links on save checkbox.
  5. Click OK until all the dialogs close.

TFS Merging Infinite Loop Madness

I made a bug fix to the trunk of one of my projects, which included a change to the project file. When I tried to merge the trunk into my development branch in TFS, I double clicked on the solution file before I commited my changes.

Now, Visual Studio is reporting this error message in a dialog box, and clicking OK causes it to reappear over and over and over again.

TF14093: ‘The item $foo\branches\foo-development\src\blah.csproj’ has a pending merge conflict, please run resolve before pending a change against it.

Hmm, where’s that pesky Run Resolve command again? Is it not possible to review pending changes in Visual Studio after a merge but before a commit when a project file has been modified?