Whilst setting up our new TFS 2012 instance I had a problem getting the build box to connect to the TFS server.
- 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
- 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.
- On the build service section a new ‘details’ link appears, but if you try to click it get a 404 error (see below)
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
<textMessageEncoding messageVersion="Soap12WSAddressing10" />
<httpTransport authenticationScheme="Ntlm" manualAddressing="true" /> <httpsTransport authenticationScheme="Ntlm" manualAddressing="true" />
- 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.
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
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
- Found the Visual Studio 2010 devenv.exe file in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
- Right click and create a shortcut on the desktop
- Rename the new desktop shortcut to ‘Visual Studio 2010’
- Right clicked on the renamed shortcut and selected ‘pin to start’
- 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
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
I posted recently on running Win8 RP on my Lenovo W520, well a few days on it is still working fine. I have adopted by usual practice of installing as few hardware vendor drivers/tool as possible, as I tend to find these make matters worse most of the time. However, I as expected I could not only rely on just what came with Windows 8.
- On installing Windows the only device not discovered was the single device ‘Intel Chipset’, this needed the Intel Chipset Support driver
- I noticed today that when on my docking station my speakers did not work. I expected to have to install the Lenovo provided audio drivers, but a check for ‘updated drivers’ on the audio device in device manager got the right ones from Windows Update.
- The fingerprint reader just work had to do nothing other than enrol my fingerprint in Control Panel –> Biometics, and unlike with the Lenovo version of the UI I had on Windows 7, I can now user a fingerprint to elevate my privileges via UAC. One issue seem to be the green LED by the reader does not light up, but as it works I can live with that.
I will report more things I need to do as I find them.
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=126.96.36.199, 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.
Whilst preparing for the Black Marble Windows 8 event tomorrow (still places available for this free event) I hit problem with VS11Beta and Metro projects.
I was sorting out a demonstration of remote debugging, I had a Samsung tablet PC running WIn8CP and intended to use a WIn8Server CP running inside a VirtualBox VM on Windows 7 PC.
- I installed VS11 Ultimate 11 Beta on both devices
- On the Win8 Tablet I loaded the VS11 remote debugger monitor
- On the Win8 Server I loaded VS11
- I created a new Metro application project
- I set the project properties to point use remote debugging and target my tablet
- I pressed F5 to debug
- And got the error "We couldn't get your developer Licence for Windows 8 Consumer Preview. Please check your internet connection and try again."
I had a good look around for a solution, most posts pointing to issues with upgrading Win7 to Win8, talk of hotfix, patches and waiting 2 days for licenses to expire. Turns out it was none of these. I eventually found the answer on the MSDN forums, you just can’t do this at present with Win8Server beta. Seems it did work with the build conference release, but not now. You have to use the desktop build of Win8CP for remote debugging.
So I created another VM using the desktop Win8CP, followed same process and it was all fine. When I got to the place I was getting a warning dialog it asked for a LiveID and all proceeded as expect. I can now do a nice remote debugging demo.
I got back from a trip away to find an unexpected bill for broadband through the letterbox. I have paid about the same each quarter for broadband for a good while now, I don’t see much variation as I rarely use my home phone, then again who does?
This bill was nearly double, why?
I think it was mostly due to setting up Skydrive to mirror my family photos and video as a backup, though this can’t explain it all, but then again my son as found Roblox. In each month I went over my usage it was costing me £5 a 5Gb block. It adds up fast.
On calling BT I found I could upgrade my package to a larger allowance and it worked out less than £1 more. The most irritating thing was they had been emailing me about my usage on my BT provided email address, an address I have never used.
So the top tip is make sure your usage notifications go to an address you actually get .
Whilst using DBAN to clean down some very old PCs for disposal to new homes at good causes I hit a stupid gotcha.
I booted off the DBAN CDRom but could not continue beyond the first screen as it did not detect I had pressed the return key.
Turns out the PCs were so old that, though their BIOS allowed USB keyboards (and I could enter setup and edit BIOS settings with a USB keyboard) the Linux kernel on the CDRom could not detect them. Once I switched to an old PS2 keyboard it all worked fine.
I found the same problem when putting Ubuntu onto same PCs; during the install I had to use a PS2 keyboard, but once the install completed it was perfectly happy with a USB keyboard.
We had an interesting issue of late building a Surface2 application solution within a TFS 2010 build system. The solution built fine in VS2010 on both my development PC and also using VS2010 on my TFS build box (both Windows 7 64bit PC), so I know I had all the right SDKs in place. However if I built it via TFS 2010 Team Build I got the error
App.xaml (136): Unknown build error, 'Index (zero based) must be greater than or equal to zero and less than the size of the argument list…”
This error appeared after we added this new block of XAML code
<CircleEase EasingMode="EaseInOut"/> - this was the line the error was reported on
I assumed the issue was that Visual Studio was somehow able to resolve an assembly reference that MSBuild could not.
so to try to resolve this I copied the MSBuild command line that was being run by the TFS build from the build log and ran it in a command prompt on my build box. Happily I got the same error, so at least it was repeatable. I then removed options on the command line until I had the minimum to give the errors. I ended up with
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe "C:\Builds\7\Surface\External Concierge CI\Sources\BlackMarble Concierge.sln"
If I changed to
MSBuild.exe "C:\Builds\7\Surface\External Concierge CI\Sources\BlackMarble Concierge.sln"
the error when away, so it had to be the version of MSBuild. When I used the 32bit version (picked up by default via the PATH) all was OK, the 64Bit gave the error.
So my fix was just to force the build to run x86 and all was OK
A blogged a while ago about a problem faking multiple SPList with Typemock Isolator in a single test. With the release of Typemock Isolator 188.8.131.52 you no longer have to use the workaround I documented.
You can now use the code if the originally planned, and it works as expected
1: public partial class TestPage : System.Web.UI.Page
3: public TestPage()
5: var fakeWeb = Isolate.Fake.Instance<SPWeb>();
7: Isolate.WhenCalled(() => SPControl.GetContextWeb(null)).WillReturn(fakeWeb);
9: // return value for 1st call
10: Isolate.WhenCalled(() => fakeWeb.Lists["Centre Locations"].Items).WillReturnCollectionValuesOf(CreateCentreList());
11: // return value for all other calls
12: Isolate.WhenCalled(() => fakeWeb.Lists["Map Zoom Areas"].Items).WillReturnCollectionValuesOf(CreateZoomAreaList());
15: private static List<SPListItem> CreateZoomAreaList()
17: var fakeZoomAreas = new List<SPListItem>();
18: fakeZoomAreas.Add(CreateZoomAreaSPListItem("London", 51.49275, -0.137722222, 2, 14));
19: return fakeZoomAreas;
22: private static List<SPListItem> CreateCentreList()
24: var fakeSites = new List<SPListItem>();
25: fakeSites.Add(CreateCentreSPListItem("Aberdeen ", "1 The Road, Aberdeen ", "Aberdeen@test.com", "www.Aberdeen.test.com", "1111", "2222", 57.13994444, -2.113333333));
26: fakeSites.Add(CreateCentreSPListItem("Altrincham ", "1 The Road, Altrincham ", "Altrincham@test.com", "www.Altrincham.test.com", "3333", "4444", 53.38977778, -2.349916667));
27: return fakeSites;
30: private static SPListItem CreateCentreSPListItem(string title, string address, string email, string url, string telephone, string fax, double lat, double lng)
32: var fakeItem = Isolate.Fake.Instance<SPListItem>();
33: Isolate.WhenCalled(() => fakeItem["Title"]).WillReturn(title);
34: Isolate.WhenCalled(() => fakeItem["Address"]).WillReturn(address);
35: Isolate.WhenCalled(() => fakeItem["Email Address"]).WillReturn(email);
36: Isolate.WhenCalled(() => fakeItem["Site URL"]).WillReturn(url);
37: Isolate.WhenCalled(() => fakeItem["Telephone"]).WillReturn(telephone);
38: Isolate.WhenCalled(() => fakeItem["Fax"]).WillReturn(fax);
39: Isolate.WhenCalled(() => fakeItem["Latitude"]).WillReturn(lat.ToString());
40: Isolate.WhenCalled(() => fakeItem["Longitude"]).WillReturn(lng.ToString());
41: return fakeItem;
44: private static SPListItem CreateZoomAreaSPListItem(string areaName, double lat, double lng, double radius, int zoom)
46: var fakeItem = Isolate.Fake.Instance<SPListItem>();
47: Isolate.WhenCalled(() => fakeItem["Title"]).WillReturn(areaName);
48: Isolate.WhenCalled(() => fakeItem["Latitude"]).WillReturn(lat.ToString());
49: Isolate.WhenCalled(() => fakeItem["Longitude"]).WillReturn(lng.ToString());
50: Isolate.WhenCalled(() => fakeItem["Radius"]).WillReturn(radius.ToString());
51: Isolate.WhenCalled(() => fakeItem["Zoom"]).WillReturn(zoom.ToString());
52: return fakeItem;
A check of the returned values shows
- web.Lists["Centre Locations"].Items.Count returns 2
- web.Lists["Map Zoom Areas"].Items.Count) returns 1