Visual Studio Debugger Failing to inspect variables

Everything compiled fine and the app is running well. However when I attached the debugger to w3wp.exe and however over variables, no value was being shown. Ctrl-Alt-Q on one for Quick Watch revealed the problem.

error CS1704: An assembly with the same simple name ‘###’ has already been imported. Try removing one of the references (e.g. ###.dll) or sign them to enable side-by-side.

Error seems straight forward enough. Help points to fixing references as the error would suggest. This only just started happening. And not just me. So it must be a code change right? Looking through version history, everything looks innocent. I check the references and they are all fine. So I must have some messed up assemblies somewhere.


Clean. Build.

Clean entire workspace. tfpt treeclean

Restart visual studio.

Rise & Repeat…

No avail. Both my git and TFVC workspaces have the same problem.

Reboot computer in case of cache.

Then I delete the Temporary ASP.NET Files for the web site in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files.

Bingo! Some change must have caused a duplicate to be place in there somehow. Not the best resolution, but as least I can inspect the code with the debugger again.

Office Lens is amazing, if you’re not using it, you probably should

I have been using Office Lens for a while now. Every time I have a use for it I am blown away at how good it is. This tool works well in real life and not just the demo scenarios shown on product pages.

Office Lens trims, enhances and makes pictures of whiteboards and docs readable, and saves them to OneNote. You can use Office Lens to convert images to PDF, Word and PowerPoint files too.   Office Lens is like having a scanner in your pocket. Like magic, it will digitalize notes on whiteboards or blackboards. Always find important documents or business cards. Sketch your ideas and snap a picture for later. Don’t lose receipts or stray sticky notes again!  You can convert your pictures to PDF files with selectable text, in addition to Word and PowerPoint files, and save them to OneDrive.

I was at a training day on the weekend. Here is the shot I got with the Lumia 930:

Office Lens_20150509_151432

Here is the slide captured by Office Lens:

Office Lens_20150509_151432_processed

Here is one of my boys’ drawings never to be lost:

Office Lens_20150314_124344

Office Lens_20150314_124344_processed

You can include up to 10 photo’s within the one document. I use it for receipts, business cards, kids drawings, white board sketches and notes, handouts from school. It is then uploaded to OneNote (now completely free), which is what I use for all and any note taking. As a hoarder by nature, having a digitalization path so quickly to get rid of the clutter is fantastic.

Get it from the Windows Phone Store for Windows Phone, iTunes for iOS or sign up for the Preview for Android.

git tfs pull command exited with error code: 128

Argh!! Another very unhelpful error message:


What am I supposed to do with that? Today I found out what. Run the command again with –d for debug.


And there is the message that should be have been with the error code:

fatal: Unable to create ‘C:/Code/Main/.git\tfs\default\index.lock’: File exists. If no other git process is currently running, this probably means a git process crashed in this repository earlier. Make sure no other git process is running and remove the file manually to continue.

I can work with that. There were no other git processes running, but the file .git\tfs\default\index.lock did exist. Deleting that we get further, this time with a very helpful error message:


Run the command: git tfs cleanup-workspaces


Looks good. Run the pull again and we are back in business.


Index Windows.edb size out of control

I don’t know if it is the files I have on my computer, but each of my machines’ index file size occasionally just goes out of control. This covered KB 2838018 The Windows.edb file grows very large in Windows 8 or Windows Server 2012. Unfortunately however even after the hotfix is installed, as seen below, 66 GB for the index on a 439 GB drive seems very much like the symptom described.


The instructions in the KB cover how to rebuild the index. I find just stopping the indexing services, deleting the file and restarting the services a quicker space recovering resolution. Note that your search everywhere in Windows, even applications from the start menu, won’t work for a little while.

Finding space to free and finding this rogue file is very easy with Space Sniffer, it is the best disk space visualization since Space Monger 1.4. Be sure however to run it as Administrator, otherwise those system files will not be shown.


The file is located at C:\ProgramData\Microsoft\Search\Data\Applications\Windows. After a rebuild it is a more reasonable 1.8 GB.


Capture IIS Network Traffic in Fiddler

I have an IIS application that is querying Azure Active Directory Graph API from the server. I wanted to capture what is requests are happening using the client API. By default Fiddler does not capture these requests. Fiddler inserts itself into the WinINET layer as a proxy which is bypassed by IIS outgoing traffic.

To capture these requests  coming from an IIS application pool. Add to your web.config after the <configSections> element:

    <defaultProxy enabled="true">
      <proxy proxyaddress="" bypassonlocal="False"/>

where 8888 is the fiddler listening port, found in Tools > Fiddler Options


This can be found in the Fiddler documentation.

Happy web traffic debugging!

A totally over-complicated way to show PowerPoint slides on a TV

I did not want to move my laptop and plug it into the TV via HDMI and use my Wireless Notebook Presenter Mouse 8000 as I normally do. So I thought I’d try a complicated way to get the slides on the TV.

Firstly, I need to the presentation shared. PowerPoint has this feature, Present Online.

Present Online


Secondly, I needed a browser on the TV. I don’t have a Smart TV. For all that functionality I use my Xbox 360. On it goes and I launch Internet Explorer which I can fortunately do now without an Xbox Live subscription.

Xbox 360 Internet Explorer

Thirdly, I have a giant URL I need to type in for the presenting online presentation. Doing that on the Xbox controller would be horrible, especially since I can’t see the computer screen and TV at the same time. Instead I connect to the Xbox via Smart Glass from the laptop running the presentation. Here I can just launch the remote control and copy and paste the URL right into the Xbox 360 browser.

Xbox 360 Smart Glass Connecting

Fourthly, I need to control the slide show in front of the TV away from computer. I could just use my Bluetooth presenter mouse. The downside to that however is that I would be missing out on my slide notes. Microsoft has recently released Office Remote. It’s a Microsoft Office add-in with a Windows Phone app. So connecting my phone to my PC via Bluetooth and connecting Office Remote I get slide navigation, speaker notes and more presenter mode features.

Office Remote in PowerPoint


Although this is overly-complicated and many moving parts it all connected quickly and easily and gave a good experience. Just goes to show how many options we have to do simple things, and that is just on the Microsoft stack. This was more for experimenting with what could be done. I would not recommend it!

Debug Lambda Expression–Delivered!

Way back in July 19, 2011 I added on the, then relatively new, Visual Studio User Voice page Debug Lambda expression feature request. It quickly gain many votes and was sitting in the top few all this time. Microsoft stated that this was a hard thing to do requiring a complete rewrite of their Expression Evaluator. Instead of just saying it was too hard and not important enough, they did get to work. It is available now in Visual Studio 2015 Preview. Full details are given in the Support for Debugging Lambda Expressions with Visual Studio 2015 on the Visual Studio ALM blog.


Debug Lambda expressions [UserVoice]

It has been a long time coming. But I for one am very happy it has come. Well done Microsoft and all who were involved.