But it works on my PC!

The random thoughts of Richard Fennell on technology and software development

_atomic_fetch_sub_4 error running VS2012RC after Office 2013 Customer Preview is installed

When I installed Office 2013 customer preview all seemed good, loads of new metro look Office features. However when I tried to load my previously working Visual Studio 2012RC I got the error

“The procedure entry point _atomic_fetch_sub_4 could not be located in the dynamic link library devenv.exe”.

 

image

This is a known issues with the C++ runtime and a patch was release last week, install this and all should be OK

TFS build service cannot connect to a TFS 2012 server - seeing EventID 206 MessageQueue in error log

Whilst setting up our new TFS 2012 instance I had a problem getting the build box to connect to the TFS server.

  1. When I started the build service (on a dedicated VM configured as a controller and single agent, connected to a TPC on the server on another VM). All appears OK, the controller and agents said they were running and state icons went green
  2. About 5 seconds later the state icons go red, but message says the controller and agents are still running, from past experience I know this means it is all dead.
  3. On the build service section a new ‘details’ link appears, but if you try to click it get a 404 error (see below)

image

In the windows event log (TFS/Build-Service/Operational section) I got the error

Build machine build2012 lost connectivity to message queue tfsmq://buildservicehost-2/.
Reason: HTTP code 404: Not Found

It is recorded as EventID 206  in the category MessageQueue

I tried reinstalling the build VM and checked the firewalls on the build VM and the TFS Server VM, all to no effect.

The issue turned out to be that the TFS URL I had used. I had used a TFS URL on the build service VM to connect to the TFS server that used HTTPS/SSL. As soon as I changed it to an HTTP URL the build service started to work. This was OK for me as the build VM and server VM were in the same machine room, so I did not really need SLL. I had just used it out of habit as this is what our developer PCs use.

However, if you did want to keep using SSL you need to do the following

  • Open the following configuration file: C:\Program Files\Microsoft Team Foundation Server 2012\Application Tier\Message Queue\web.config
  • Find a section like the bindings section below
  • Alter httpTransport to say httpsTransport

    <bindings>
      <customBinding>
        <binding name="TfsSoapBinding">
          <textMessageEncoding messageVersion="Soap12WSAddressing10" />
          <httpTransport authenticationScheme="Ntlm" manualAddressing="true" />
          <httpsTransport authenticationScheme="Ntlm" manualAddressing="true" />
        </binding>
      </customBinding>
    </bindings>

  • Save the file
  • Recycle the IIS app pool
  • Restart the build service on the build VM

Thanks to Patrick on the TFS team for helping me get to the bottom of this.

Where did my Visual Studio 2010 link go from my Windows 8 desktop after I installed SSDT?

I have been finding the ‘hit the windows key and type’ means to launch desktop applications in Windows 8 quite nice. It means I get used to the same behaviour in Windows or Ubuntu to launch things, no need to remember menu locations just type a name, all very slickrun . However, I hit a problem today, I hit the windows key, typed Visual and expected to see Visual Studio 2012 and 2010, but I only saw Visual Studio 2012

image

But both were there yesterday!

The issue was I had install SSDT (SQL Server Data Tools), this is hosted within the Visual Studio 2010 shell and had renamed my Metro desktop Visual Studio 2010 App to Microsoft SQL Server Data Tools. If I typed this the app was found and it launched Visual Studio 2010. I then could choose whether to use SSDT or Ultimate features as you would expect. This is the same behaviour as on Windows 7, it is just on Windows 7 you would have two menu items, one for SSDT and one for VS2010 both pointing to the same place.

Now I am a creature of habit, even if it is a newly formed one, and I like to just type Vis, so this is how I got the link back into the Metro desktop, might be other ways but this is the one that worked for me

  1. Found the Visual Studio 2010 devenv.exe file in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
  2. Right click and create a shortcut on the desktop
  3. Rename the new desktop shortcut to ‘Visual Studio 2010’
  4. Right clicked on the renamed shortcut and selected ‘pin to start’
  5. Deleted the desktop shortcut, it is no longer needed as it has been copied, yes I found this a bit strange too, but I do like a clean desktop so delete it I did. You don’t have to delete it if you want a desktop shortcut.

I can now press the Windows key, type Vis and I can see both Vs 2010 and 2012, and I can still type SQL and get to SSDT

image

Cannot update local workspace in TFS 2012RC due to UAC

Whilst preparing the demos for my TFS 2012 ALM session on Wednesday (still places available of you are in the Yorkshire area), I got the following error whey trying to add a new solution of sample code to TFS

Access to the path 'C:\ProgramData\Microsoft Team Foundation Local Workspaces\043519e4-72cf-4cd0-a711-f4bb8b817f30\TYPHOON;432cfb95-26d6-4a68-af26-b102c950a90d\properties.tf1' is denied.

It seems that the ..\04535… folder had been created when I was running VS2012 using ‘run as administrator’. When I tried to browse it I was prompted for UAC elevated privileges. So if I was not running VS2012 as administrator I could not access the folder. For me the solution was to just delete the folder and let VS/TFS recreate it. I had no checked out files so it did not matter.  Once done all was OK

One to key an eye on

TF215097 when running a build

I have been working on one of our build boxes today restructuring our Surface solutions to make better of Nuget. This involved upgraded the Azure SDK on the build box to the new June release, which needed a reboot halfway through the process. After the reboot and tried a new build I got the error

TF215097: An error occurred while initializing a build for build definition \Surface\RetailApplication.Main CI: Could not load file or assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Basically the build did not start at all. Various forum posts point to corrupt build template .XAML or missing assemblies. But as it was working, the assembly name is in the core framework it all seem a bit strange.

The fix was the old favourite, stop and restart the build service from with TFS Admin console on the build box. Once this was done all as fine, so I guess some rubbish was cached.

ALM Rangers sim-ship guidance with the VS11 RC

I am really proud to have been involved in the team of ALM Rangers who have SIMultaneous-SHIPped best practice guidance with Visual Studio 11 RC, which became available last night.

I am sure anyone working with Visual Studio and TFS will find the guidance of value, I have certainly learned a lot whilst helping produce the material. It has been a great experience working with a great crowd of people both inside and outside of Microsoft.

Visual Studio

On the panel at Tech.Days: Visual Studio 11 Online Event

A while ago I recorded a video Visual Studio Team Foundation for Everyone, this forms part of Tech.Days: Visual Studio 11 Online Event, 28th June 2012, 1pm to 3pm. To lift the agenda from the MSDN site

This event will cover the key new features and capabilities that Visual Studio 11 offers software development teams, and the opportunity to ask questions to the UK Developer Tools team and partners. There’ll be something for almost anyone involved in software development, from Project Managers & Scrum Masters to developers and testers.

So if you have any questions on TEE or any of the new features VS/TFS11 why not register?

A fix for my failure to login to TFSpreview.com problems

I use a number of site collections on the Azure hosted Team Foundations Service (http://tfspreview.com); I have just solved a problem that I could not login to one of them via Visual Studio (2010, Dev11 or also TEE 11, I tried then all), but I could login to my other collections. Also I could access the collection if I logged in via a browser, just not with VS; all very good for work item management, but not much help for source code check-ins.

The Problem

The problem was that when I loaded Visual Studio and tried to select the collection https://mycollection.tfspreview.com in Team Explorer the ‘Sign into Team Foundation Server’ form loaded and uploaded a few times whilst trying to redirect to an authentication provider. I then ended up with a TF31003 error. A retry or use of different credentials did not help

image

If a deleted the server from the list and tried to re-add it I got similar results, but ended up at the LiveID sign in screen, but just an error message and no means to enter details.

image

The Solution

The problem was due to cached LiveID credentials. It was suggested I clear IE9 cookies but this did not help. In the end I found the solution in the Credential Manager (Control Panel > User Accounts > Manage Users > Advanced > Manage Passwords).

I had recently installed Skydrive on my PC. This had stored a cached LiveID, the issue was it seems this cached Skydrive LiveID was being used to access TFSpreview. Unfortunately this was my personal LiveID not my work one. This personal LiveID had no rights to access the problem site collection, but I could get into the other collections because both my personal and work LiveID both had access.

So I deleted the offending cached LiveID and tried Team Explorer again and this time I was prompted for a LiveID (though the user name field did contain the wrong LiveID, I could correct it) and I could login.

image

I then loaded SkyDrive (which I had exited) it prompted me to re-enter my credential. It recreated it cached credentials and seemed happy.

Interestingly they did not seem to cause a problem this time, maybe it is an entry order issue?

I need to keep an eye on it.