Why do I get an error while uploading images to the Sitecore image library

2015-05-12

Yesterday I saw this error in Sitecore 8. 

Parameter null error

[ArgumentNullException: Value cannot be null. Parameter name: key]
System.Collections.Generic.Dictionary2.FindEntry(TKey key) +14370237</span> <span style="font-family: 'courier new', courier; font-size: x-small;">System.Collections.Generic.Dictionary2.TryGetValue(TKey key, TValue& value) +20
Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.SelectionMappingRenderTraceListener
  .GetLiteralTraceData(LiteralControl literal, TraceData& data) +71

Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.SelectionMappingRenderTraceListener
  .GetTraceData(Object renderedObject) +223

Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.SelectionMappingRenderTraceListener
  .EndRendering(TextWriter writer, Object renderedObject) +47

Being the first time I am running a project on Sitecore 8 I feared the product had died on me :(

This seem to be caused by an error in Visual Studio 2013

Simply adding this guy to webconfig app settings solves the problem

<configuration>
<appSettings>
**<add key="PageInspector:ServerCodeMappingSupport" value="Disabled"/>**
</appSettings>
</configuration>

Thanks to Alexander Sharamok for pointing me in the right direction.