<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" version="2.0">
  <channel>
    <title>Daniel Fisher (lennybacon.com)</title>
    <link>http://lennybacon.com/</link>
    <description>SOA, DATA &amp; THE WEB</description>
    <image>
      <url>http://lennybacon.com/images/daniel_fisher_lennybacon.jpg</url>
      <title>Daniel Fisher (lennybacon.com)</title>
      <link>http://lennybacon.com/</link>
    </image>
    <language>en-us</language>
    <copyright>Daniel Fisher(lennybacon.com)</copyright>
    <lastBuildDate>Fri, 11 Nov 2011 21:08:27 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>info@lennybacon.com</managingEditor>
    <webMaster>info@lennybacon.com</webMaster>
    <item>
      <trackback:ping>http://lennybacon.com/Trackback.aspx?guid=64ce22d8-fd23-4072-ab45-52ce82f76f26</trackback:ping>
      <pingback:server>http://lennybacon.com/pingback.aspx</pingback:server>
      <pingback:target>http://lennybacon.com/PermaLink,guid,64ce22d8-fd23-4072-ab45-52ce82f76f26.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://lennybacon.com/CommentView,guid,64ce22d8-fd23-4072-ab45-52ce82f76f26.aspx</wfw:comment>
      <wfw:commentRss>http://lennybacon.com/SyndicationService.asmx/GetEntryCommentsRss?guid=64ce22d8-fd23-4072-ab45-52ce82f76f26</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I’m a lazy developer. Being lazy does not mean I avoid to work. It means that I like
to reflect things I am doing and optimize and atomize stuff to get more time on the
valuable tasks. Code generation is a tool I tend to use quite regularly and T4 is
at most my generator of choice.
</p>
        <p>
Generated files can cause a lot of merging conflicts. So they are not to be checked
into my source control system (currently my choice is HG/Mercurial). 
</p>
        <p>
For the build server this means the files do not exist when the repository is freshly
checked out – they need to be generated during the build right before the compile
happens.
</p>
        <p>
With code generation I usually tend to use a pattern that is for example also used
by ASP.NET MVC Views/Controller generation: If there is a local directory containing
code generation templates, use it. Otherwise utilize the system wide templates.
</p>
        <p>
MsBuild version 4.0 comes with a feature called <a href="http://msdn.microsoft.com/en-us/library/dd633440.aspx" target="_blank">property
functions</a>. This allows to place for instance a “find directories” inside a property
group.
</p>
        <p>
I use them to:
</p>
        <ul>
          <li>
Allow to set a system wide template directory using the command line/the MsBuild API.</li>
          <li>
If no directory is set use a local directory.</li>
          <li>
If non of the above is applied set a fallback default.</li>
        </ul>
        <p>
Here is the XML snippet that shows how to use the pattern:
</p>
        <p>
        </p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:31369ec9-493a-4608-a6a3-c24065143a79" class="wlWriterEditableSmartContent">
          <pre class="brush: xml; gutter: false; first-line: 1; tab-size: 4;  toolbar: false;  width: 659px; height: 796px;" style=" width: 659px; height: 796px;overflow: auto;">&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;Project 
    DefaultTargets="Generate" 
	ToolsVersion="4.0" 
	xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
	
	&lt;PropertyGroup&gt;
		&lt;RootFolder&gt;..\src&lt;/RootFolder&gt;
		&lt;CodeGeneratorDir 
			Condition=" '$(CodeGeneratorDir)' == '' " /&gt;
		&lt;LocalCodeGeneratorDir&gt;
			CodeGenerationTemplates
		&lt;/LocalCodeGeneratorDir&gt;
		&lt;CodeGeneratorDirFallback&gt;
			C:\CodeGenerationTemplates
		&lt;/CodeGeneratorDirFallback&gt;
	&lt;/PropertyGroup&gt;
	
	&lt;ItemGroup&gt;
		&lt;ModelFiles 
			Include="..\src\**\*.xdml" 
		/&gt;
		&lt;TemplateDirectory 
			Include="$(CodeGeneratorDir);" 
		/&gt;
		&lt;TemplateDirectory 
			Condition=" '$(CodeGeneratorDir)' == '' " 
			Include="$([System.IO.Directory]::GetDirectories(
				&amp;quot;$(RootFolder)&amp;quot;, 
				&amp;quot;$(LocalCodeGeneratorDir)&amp;quot;, 
				System.IO.SearchOption.AllDirectories))"
		/&gt;
		&lt;TemplateDirectory 
			Condition=" '@(TemplateDirectory)' == '' " 
			Include="$(CodeGeneratorDirFallback)" 
		/&gt;
	&lt;/ItemGroup&gt;

	&lt;Target Name="Generate"&gt;
		&lt;Message Text="@(TemplateDirectory)" /&gt;
		&lt;Message Text="@(ModelFiles)" /&gt;
  &lt;/Target&gt;
  
&lt;/Project&gt;</pre>
          <!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com -->
        </div>
        <img width="0" height="0" src="http://lennybacon.com/aggbug.ashx?id=64ce22d8-fd23-4072-ab45-52ce82f76f26" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://devcoach.com">devcoach.com</a>. 
</body>
      <title>MsBuild finding directories if not given as parameter</title>
      <guid isPermaLink="false">http://lennybacon.com/PermaLink,guid,64ce22d8-fd23-4072-ab45-52ce82f76f26.aspx</guid>
      <link>http://lennybacon.com/2011/11/11/MsBuildFindingDirectoriesIfNotGivenAsParameter.aspx</link>
      <pubDate>Fri, 11 Nov 2011 21:08:27 GMT</pubDate>
      <description>&lt;p&gt;
I’m a lazy developer. Being lazy does not mean I avoid to work. It means that I like
to reflect things I am doing and optimize and atomize stuff to get more time on the
valuable tasks. Code generation is a tool I tend to use quite regularly and T4 is
at most my generator of choice.
&lt;/p&gt;
&lt;p&gt;
Generated files can cause a lot of merging conflicts. So they are not to be checked
into my source control system (currently my choice is HG/Mercurial). 
&lt;/p&gt;
&lt;p&gt;
For the build server this means the files do not exist when the repository is freshly
checked out – they need to be generated during the build right before the compile
happens.
&lt;/p&gt;
&lt;p&gt;
With code generation I usually tend to use a pattern that is for example also used
by ASP.NET MVC Views/Controller generation: If there is a local directory containing
code generation templates, use it. Otherwise utilize the system wide templates.
&lt;/p&gt;
&lt;p&gt;
MsBuild version 4.0 comes with a feature called &lt;a href="http://msdn.microsoft.com/en-us/library/dd633440.aspx" target="_blank"&gt;property
functions&lt;/a&gt;. This allows to place for instance a “find directories” inside a property
group.
&lt;/p&gt;
&lt;p&gt;
I use them to:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Allow to set a system wide template directory using the command line/the MsBuild API.&lt;/li&gt;
&lt;li&gt;
If no directory is set use a local directory.&lt;/li&gt;
&lt;li&gt;
If non of the above is applied set a fallback default.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Here is the XML snippet that shows how to use the pattern:
&lt;/p&gt;
&lt;p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:31369ec9-493a-4608-a6a3-c24065143a79" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: xml; gutter: false; first-line: 1; tab-size: 4;  toolbar: false;  width: 659px; height: 796px;" style=" width: 659px; height: 796px;overflow: auto;"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;
&amp;lt;Project 
    DefaultTargets=&amp;quot;Generate&amp;quot; 
	ToolsVersion=&amp;quot;4.0&amp;quot; 
	xmlns=&amp;quot;http://schemas.microsoft.com/developer/msbuild/2003&amp;quot;&amp;gt;
	
	&amp;lt;PropertyGroup&amp;gt;
		&amp;lt;RootFolder&amp;gt;..\src&amp;lt;/RootFolder&amp;gt;
		&amp;lt;CodeGeneratorDir 
			Condition=&amp;quot; '$(CodeGeneratorDir)' == '' &amp;quot; /&amp;gt;
		&amp;lt;LocalCodeGeneratorDir&amp;gt;
			CodeGenerationTemplates
		&amp;lt;/LocalCodeGeneratorDir&amp;gt;
		&amp;lt;CodeGeneratorDirFallback&amp;gt;
			C:\CodeGenerationTemplates
		&amp;lt;/CodeGeneratorDirFallback&amp;gt;
	&amp;lt;/PropertyGroup&amp;gt;
	
	&amp;lt;ItemGroup&amp;gt;
		&amp;lt;ModelFiles 
			Include=&amp;quot;..\src\**\*.xdml&amp;quot; 
		/&amp;gt;
		&amp;lt;TemplateDirectory 
			Include=&amp;quot;$(CodeGeneratorDir);&amp;quot; 
		/&amp;gt;
		&amp;lt;TemplateDirectory 
			Condition=&amp;quot; '$(CodeGeneratorDir)' == '' &amp;quot; 
			Include=&amp;quot;$([System.IO.Directory]::GetDirectories(
				&amp;amp;quot;$(RootFolder)&amp;amp;quot;, 
				&amp;amp;quot;$(LocalCodeGeneratorDir)&amp;amp;quot;, 
				System.IO.SearchOption.AllDirectories))&amp;quot;
		/&amp;gt;
		&amp;lt;TemplateDirectory 
			Condition=&amp;quot; '@(TemplateDirectory)' == '' &amp;quot; 
			Include=&amp;quot;$(CodeGeneratorDirFallback)&amp;quot; 
		/&amp;gt;
	&amp;lt;/ItemGroup&amp;gt;

	&amp;lt;Target Name=&amp;quot;Generate&amp;quot;&amp;gt;
		&amp;lt;Message Text=&amp;quot;@(TemplateDirectory)&amp;quot; /&amp;gt;
		&amp;lt;Message Text=&amp;quot;@(ModelFiles)&amp;quot; /&amp;gt;
  &amp;lt;/Target&amp;gt;
  
&amp;lt;/Project&amp;gt;&lt;/pre&gt;
&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;
&lt;/div&gt;
&gt;
&lt;img width="0" height="0" src="http://lennybacon.com/aggbug.ashx?id=64ce22d8-fd23-4072-ab45-52ce82f76f26" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://devcoach.com"&gt;devcoach.com&lt;/a&gt;. </description>
      <comments>http://lennybacon.com/CommentView,guid,64ce22d8-fd23-4072-ab45-52ce82f76f26.aspx</comments>
      <category>Build</category>
      <category>Projects</category>
    </item>
    <item>
      <trackback:ping>http://lennybacon.com/Trackback.aspx?guid=3f1ee83b-7bee-4893-a8fa-cdcc67d64d03</trackback:ping>
      <pingback:server>http://lennybacon.com/pingback.aspx</pingback:server>
      <pingback:target>http://lennybacon.com/PermaLink,guid,3f1ee83b-7bee-4893-a8fa-cdcc67d64d03.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://lennybacon.com/CommentView,guid,3f1ee83b-7bee-4893-a8fa-cdcc67d64d03.aspx</wfw:comment>
      <wfw:commentRss>http://lennybacon.com/SyndicationService.asmx/GetEntryCommentsRss?guid=3f1ee83b-7bee-4893-a8fa-cdcc67d64d03</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Once in a while it happens that an exception is thrown like the following: 
</p>
        <p>
Could not load file or assembly 'devcoach.Core, Version=1.0.11308.1, Culture=neutral,
PublicKeyToken=0313e76cb5077f22' or one of its dependencies. The located assembly's
manifest definition does not match the assembly reference. (Exception from HRESULT:
0x80131040) 
</p>
        <h2>What did cause this exception to be fired? 
</h2>
        <p>
Lets have a look at the following picture which illustrates the scenario. 
</p>
        <p>
          <a href="http://lennybacon.com/content/binary/Windows-Live-Writer/Versioning_10F83/image_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lennybacon.com/content/binary/Windows-Live-Writer/Versioning_10F83/image_thumb.png" width="458" height="225" />
          </a>
        </p>
        <p>
The build order is defined by the dependencies. As we have separate modular component
oriented development each project resides it its own repository and has its own nuget
package. 
</p>
        <h2>How is Visual Studio handling references? 
</h2>
        <p>
          <a href="http://lennybacon.com/content/binary/Windows-Live-Writer/Versioning_10F83/image_6.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lennybacon.com/content/binary/Windows-Live-Writer/Versioning_10F83/image_thumb_2.png" width="407" height="216" />
          </a>
        </p>
        <p>
If we do not reference from GAC or another Project the target is always (if the assembly
is strong names – and yes it should!) the Assembly.FullName as seen here: 
</p>
        <pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;<br />
&lt;Project 
<br />
ToolsVersion="4.0" 
<br />
DefaultTargets="Build" 
<br />
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;<br />
    &lt;ItemGroup&gt;<br />
      &lt;Reference 
<br />
Include="devcoach.Core, Version=1.0.11308.1, …"&gt;<br />
      &lt;HintPath&gt;..\packages\…\devcoach.Core.dll&lt;/HintPath&gt;<br />
  &lt;/Reference&gt;</pre>
        <pre>…<br /></pre>
        <p>
We change the “Version Specific” setting in Visual Studio’s property windows manually.
</p>
        <p>
          <a href="http://lennybacon.com/content/binary/Windows-Live-Writer/Versioning_10F83/image_8.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lennybacon.com/content/binary/Windows-Live-Writer/Versioning_10F83/image_thumb_3.png" width="284" height="373" />
          </a>
        </p>
        <p>
And manipulate the result to be:
</p>
        <pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;<br />
&lt;Project 
<br />
ToolsVersion="4.0" 
<br />
DefaultTargets="Build" 
<br />
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;<br />
    &lt;ItemGroup&gt;<br />
      &lt;Reference Include="devcoach.Core, Version=1.0.11308.1,…"&gt;<br />
      &lt;VersionSpecific&gt;False&lt;/VersionSpecific&gt;<br />
&lt;HintPath&gt;..\packages\…\devcoach.Core.dll&lt;/HintPath&gt;<br />
  &lt;/Reference&gt;</pre>
        <pre>…<br /></pre>
        <h2>Why does this matter?
</h2>
        <p>
1) Sometimes during development – especially when hunting a bug – it happens that
I create a solution that crosses repository frontiers. This requires to switch from
a nuget reference to a project reference. After work is done it is important that
the project reference is rolled back to a nuget package reference. I created a small
helper for that job called <a href="http://visualstudiogallery.msdn.microsoft.com/cfa0266e-c8d9-4e37-b073-ba022391bee8" target="_blank">Reference
Switcher</a>. The rolled back reference now points to a newer version as functionality
was added or a bug was removed. 
</p>
        <p>
2) Almost every time before I start working on a project I update the nuget package
references. The updated reference may points to a newer version if functionality was
added or a bug was removed. 
</p>
        <p>
3) In a web application project while updating a package visual studio realizes that
the file is not there or not accessable (while beeing written) and falls back to the
assembly that was copied to the bin directory during the last build – the prior version
of course.
</p>
        <p>
So each and every time a new version is introduced (while Visual Studio is running)
it means to be clever and behaves as described. When the solution is commited to the
source control server, pulled by the build server, packages get updated, build fails
– NO nuget package is published. we have the issue in place.
</p>
        <h2>A build task to the rescue
</h2>
        <p>
I wrote a msbuild task to solve the problems by modifying the project file. It switches
references with version information to the form:
</p>
        <pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;<br />
&lt;Project 
<br />
ToolsVersion="4.0" 
<br />
DefaultTargets="Build" 
<br />
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;<br />
    &lt;ItemGroup&gt;<br />
      &lt;Reference Include="devcoach.Core"&gt;<br />
      &lt;HintPath&gt;..\packages\…\devcoach.Core.dll&lt;/HintPath&gt;<br />
  &lt;/Reference&gt;</pre>
        <pre>…<br /></pre>
        <p>
Additionally, if the HintPath’s innerText points to an assembly placed inside the
bin directory it tries to find the corresponding package and references the assembly
from there – of course without version information.
</p>
        <p>
Usually I prefer XmlReader and Writer but as we are in a non-performance-critical
area I just dumped the memory-eating XmlDocument in.
</p>
        <pre>using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Xml;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;

namespace devcoach.Tools.BuildTasks
{
	public class ModifyProjectFile : Task
	{
		[Required]
		public string[] ProjectFile { get; set; }

		public bool SetVersionSpecificationToFalse { get; set; }
		public bool PreferPackageReferences { get; set; }

		public override bool Execute()
		{
			var listener = new MsBuildLogTraceListener(Log);
			Trace.Listeners.Add(listener);

			try
			{
				foreach (var projectFile in ProjectFile)
				{
					var projectFilePath = Path.GetFullPath(projectFile);
					Trace.TraceInformation(
						string.Concat(
							"Processing file '",
							projectFilePath,
							"'..."));
					if (SetVersionSpecificationToFalse)
					{
						Trace.TraceInformation(
							"Set version specification to false.");
						RemoveVersionSpecification(projectFilePath);
					}
					if (PreferPackageReferences)
					{
						Trace.TraceInformation(
							"Prefer package references.");
						ReplaceBinReferences(projectFilePath);
					}
				}

				return true;
			}
			catch (Exception ex)
			{
				Log.LogErrorFromException(ex);
				return false;
			}
			finally
			{
				Trace.Listeners.Remove(listener);

			}
		}

		private void ReplaceBinReferences(string projectFile)
		{
			var projectDirectory = Path.GetDirectoryName(projectFile);
			var pdInfo = new DirectoryInfo(projectDirectory);
			var solutionDirInfo = pdInfo.Parent;

			var packagesDir = 
				Path.Combine(
					solutionDirInfo.FullName,
					"packages");

			if (!Directory.Exists(packagesDir))
			{
				Trace.TraceInformation("No packages directory found...");
				return;
			}

			var projectDoc = new XmlDocument();
			projectDoc.Load(projectFile);

			var xmlnsmgr = new XmlNamespaceManager(projectDoc.NameTable);
			xmlnsmgr.AddNamespace(
				"msbuild",
				"http://schemas.microsoft.com/developer/msbuild/2003");

			var hintPathNodes=
				projectDoc.SelectNodes(
					"/msbuild:Project/msbuild:ItemGroup/msbuild:Reference/msbuild:HintPath",
					xmlnsmgr);

			if (hintPathNodes == null)
			{
				Trace.TraceInformation("No references found...");
				return;
			}
			foreach (XmlNode hintPathNode in hintPathNodes)
			{
				var hintPath = hintPathNode.InnerText;

				var binIndex = hintPath.IndexOf("\\bin\\");
				var startsWithBin = 
					hintPath.StartsWith(".\\bin\\") || 
					hintPath.StartsWith("bin\\");
				if (binIndex &gt; -1 || startsWithBin)
				{
					var referenceFile = Path.GetFileName(hintPath);

					var newReference = 
						Directory.EnumerateFiles(
							packagesDir,
							referenceFile,
							SearchOption.AllDirectories).FirstOrDefault();

					if (newReference == null)
					{
						Trace.TraceInformation(
							string.Concat(
								"No package found for '",
								hintPath,
								"'..."));
						return;
					}

					Trace.TraceInformation(
						string.Concat(
							"Patching hintpath to '",
							newReference,
							"'..."));

					hintPathNode.InnerText = newReference;

				}
			}
			projectDoc.Save(projectFile);
		}

		public void RemoveVersionSpecification(string projectFile)
		{
			var projectDoc = new XmlDocument();
			projectDoc.Load(projectFile);

			var xmlnsmgr = new XmlNamespaceManager(projectDoc.NameTable);
			xmlnsmgr.AddNamespace(
				"msbuild",
				"http://schemas.microsoft.com/developer/msbuild/2003");

			var referenceNodes =
				projectDoc.SelectNodes(
					"/msbuild:Project/msbuild:ItemGroup/msbuild:Reference",
					xmlnsmgr);
			if (referenceNodes == null)
			{
				Trace.TraceInformation("No references found...");
				return;
			}
			foreach (XmlNode referenceNode in referenceNodes)
			{
				var include = referenceNode.Attributes["Include"].Value;

				var commaIndex = include.IndexOf(",");
				if (commaIndex &gt; -1)
				{
					var reference = include.Substring(0, commaIndex);
					
					Trace.TraceInformation(
						string.Concat(
							"Unversion reference to '",
							reference,
							"'..."));
					referenceNode.Attributes["Include"].Value = reference;

				}
			}
			projectDoc.Save(projectFile);
		}

	}
}
</pre>
        <p>
The resulting manifest shows, that the Assembly is nonetheless references with a specific
version:
</p>
        <p>
          <a href="http://lennybacon.com/content/binary/Windows-Live-Writer/Versioning_10F83/image_10.png">
            <img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lennybacon.com/content/binary/Windows-Live-Writer/Versioning_10F83/image_thumb_4.png" width="244" height="142" />
          </a>
        </p>
        <img width="0" height="0" src="http://lennybacon.com/aggbug.ashx?id=3f1ee83b-7bee-4893-a8fa-cdcc67d64d03" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://devcoach.com">devcoach.com</a>. 
</body>
      <title>Could not load file or assembly exception and how to fix your builds when using nuget packages</title>
      <guid isPermaLink="false">http://lennybacon.com/PermaLink,guid,3f1ee83b-7bee-4893-a8fa-cdcc67d64d03.aspx</guid>
      <link>http://lennybacon.com/2011/11/06/CouldNotLoadFileOrAssemblyExceptionAndHowToFixYourBuildsWhenUsingNugetPackages.aspx</link>
      <pubDate>Sun, 06 Nov 2011 19:10:37 GMT</pubDate>
      <description>&lt;p&gt;
Once in a while it happens that an exception is thrown like the following: 
&lt;p&gt;
Could not load file or assembly 'devcoach.Core, Version=1.0.11308.1, Culture=neutral,
PublicKeyToken=0313e76cb5077f22' or one of its dependencies. The located assembly's
manifest definition does not match the assembly reference. (Exception from HRESULT:
0x80131040) 
&lt;h2&gt;What did cause this exception to be fired? 
&lt;/h2&gt;
&lt;p&gt;
Lets have a look at the following picture which illustrates the scenario. 
&lt;p&gt;
&lt;a href="http://lennybacon.com/content/binary/Windows-Live-Writer/Versioning_10F83/image_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lennybacon.com/content/binary/Windows-Live-Writer/Versioning_10F83/image_thumb.png" width="458" height="225"&gt;&lt;/a&gt; 
&lt;p&gt;
The build order is defined by the dependencies. As we have separate modular component
oriented development each project resides it its own repository and has its own nuget
package. 
&lt;h2&gt;How is Visual Studio handling references? 
&lt;/h2&gt;
&lt;p&gt;
&lt;a href="http://lennybacon.com/content/binary/Windows-Live-Writer/Versioning_10F83/image_6.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lennybacon.com/content/binary/Windows-Live-Writer/Versioning_10F83/image_thumb_2.png" width="407" height="216"&gt;&lt;/a&gt; 
&lt;p&gt;
If we do not reference from GAC or another Project the target is always (if the assembly
is strong names – and yes it should!) the Assembly.FullName as seen here: &lt;pre&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br&gt;
&amp;lt;Project 
&lt;br&gt;
ToolsVersion="4.0" 
&lt;br&gt;
DefaultTargets="Build" 
&lt;br&gt;
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ItemGroup&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Reference 
&lt;br&gt;
Include="devcoach.Core, Version=1.0.11308.1, …"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;HintPath&amp;gt;..\packages\…\devcoach.Core.dll&amp;lt;/HintPath&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/Reference&amp;gt;&lt;/pre&gt;&lt;pre&gt;…&lt;br&gt;
&lt;/pre&gt;
&lt;p&gt;
We change the “Version Specific” setting in Visual Studio’s property windows manually.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://lennybacon.com/content/binary/Windows-Live-Writer/Versioning_10F83/image_8.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lennybacon.com/content/binary/Windows-Live-Writer/Versioning_10F83/image_thumb_3.png" width="284" height="373"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
And manipulate the result to be:
&lt;/p&gt;
&lt;pre&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br&gt;
&amp;lt;Project 
&lt;br&gt;
ToolsVersion="4.0" 
&lt;br&gt;
DefaultTargets="Build" 
&lt;br&gt;
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ItemGroup&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Reference Include="devcoach.Core, Version=1.0.11308.1,…"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;VersionSpecific&amp;gt;False&amp;lt;/VersionSpecific&amp;gt;&lt;br&gt;
&amp;lt;HintPath&amp;gt;..\packages\…\devcoach.Core.dll&amp;lt;/HintPath&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/Reference&amp;gt;&lt;/pre&gt;&lt;pre&gt;…&lt;br&gt;
&lt;/pre&gt;
&lt;h2&gt;Why does this matter?
&lt;/h2&gt;
&lt;p&gt;
1) Sometimes during development – especially when hunting a bug – it happens that
I create a solution that crosses repository frontiers. This requires to switch from
a nuget reference to a project reference. After work is done it is important that
the project reference is rolled back to a nuget package reference. I created a small
helper for that job called &lt;a href="http://visualstudiogallery.msdn.microsoft.com/cfa0266e-c8d9-4e37-b073-ba022391bee8" target="_blank"&gt;Reference
Switcher&lt;/a&gt;. The rolled back reference now points to a newer version as functionality
was added or a bug was removed. 
&lt;p&gt;
2) Almost every time before I start working on a project I update the nuget package
references. The updated reference may points to a newer version if functionality was
added or a bug was removed. 
&lt;/p&gt;
&lt;p&gt;
3) In a web application project while updating a package visual studio realizes that
the file is not there or not accessable (while beeing written) and falls back to the
assembly that was copied to the bin directory during the last build – the prior version
of course.
&lt;/p&gt;
&lt;p&gt;
So each and every time a new version is introduced (while Visual Studio is running)
it means to be clever and behaves as described. When the solution is commited to the
source control server, pulled by the build server, packages get updated, build fails
– NO nuget package is published. we have the issue in place.
&lt;/p&gt;
&lt;h2&gt;A build task to the rescue
&lt;/h2&gt;
&lt;p&gt;
I wrote a msbuild task to solve the problems by modifying the project file. It switches
references with version information to the form:
&lt;/p&gt;
&lt;pre&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br&gt;
&amp;lt;Project 
&lt;br&gt;
ToolsVersion="4.0" 
&lt;br&gt;
DefaultTargets="Build" 
&lt;br&gt;
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ItemGroup&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Reference Include="devcoach.Core"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;HintPath&amp;gt;..\packages\…\devcoach.Core.dll&amp;lt;/HintPath&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/Reference&amp;gt;&lt;/pre&gt;&lt;pre&gt;…&lt;br&gt;
&lt;/pre&gt;
&lt;p&gt;
Additionally, if the HintPath’s innerText points to an assembly placed inside the
bin directory it tries to find the corresponding package and references the assembly
from there – of course without version information.
&lt;/p&gt;
&lt;p&gt;
Usually I prefer XmlReader and Writer but as we are in a non-performance-critical
area I just dumped the memory-eating XmlDocument in.
&lt;/p&gt;
&lt;pre&gt;using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Xml;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;

namespace devcoach.Tools.BuildTasks
{
	public class ModifyProjectFile : Task
	{
		[Required]
		public string[] ProjectFile { get; set; }

		public bool SetVersionSpecificationToFalse { get; set; }
		public bool PreferPackageReferences { get; set; }

		public override bool Execute()
		{
			var listener = new MsBuildLogTraceListener(Log);
			Trace.Listeners.Add(listener);

			try
			{
				foreach (var projectFile in ProjectFile)
				{
					var projectFilePath = Path.GetFullPath(projectFile);
					Trace.TraceInformation(
						string.Concat(
							"Processing file '",
							projectFilePath,
							"'..."));
					if (SetVersionSpecificationToFalse)
					{
						Trace.TraceInformation(
							"Set version specification to false.");
						RemoveVersionSpecification(projectFilePath);
					}
					if (PreferPackageReferences)
					{
						Trace.TraceInformation(
							"Prefer package references.");
						ReplaceBinReferences(projectFilePath);
					}
				}

				return true;
			}
			catch (Exception ex)
			{
				Log.LogErrorFromException(ex);
				return false;
			}
			finally
			{
				Trace.Listeners.Remove(listener);

			}
		}

		private void ReplaceBinReferences(string projectFile)
		{
			var projectDirectory = Path.GetDirectoryName(projectFile);
			var pdInfo = new DirectoryInfo(projectDirectory);
			var solutionDirInfo = pdInfo.Parent;

			var packagesDir = 
				Path.Combine(
					solutionDirInfo.FullName,
					"packages");

			if (!Directory.Exists(packagesDir))
			{
				Trace.TraceInformation("No packages directory found...");
				return;
			}

			var projectDoc = new XmlDocument();
			projectDoc.Load(projectFile);

			var xmlnsmgr = new XmlNamespaceManager(projectDoc.NameTable);
			xmlnsmgr.AddNamespace(
				"msbuild",
				"http://schemas.microsoft.com/developer/msbuild/2003");

			var hintPathNodes=
				projectDoc.SelectNodes(
					"/msbuild:Project/msbuild:ItemGroup/msbuild:Reference/msbuild:HintPath",
					xmlnsmgr);

			if (hintPathNodes == null)
			{
				Trace.TraceInformation("No references found...");
				return;
			}
			foreach (XmlNode hintPathNode in hintPathNodes)
			{
				var hintPath = hintPathNode.InnerText;

				var binIndex = hintPath.IndexOf("\\bin\\");
				var startsWithBin = 
					hintPath.StartsWith(".\\bin\\") || 
					hintPath.StartsWith("bin\\");
				if (binIndex &amp;gt; -1 || startsWithBin)
				{
					var referenceFile = Path.GetFileName(hintPath);

					var newReference = 
						Directory.EnumerateFiles(
							packagesDir,
							referenceFile,
							SearchOption.AllDirectories).FirstOrDefault();

					if (newReference == null)
					{
						Trace.TraceInformation(
							string.Concat(
								"No package found for '",
								hintPath,
								"'..."));
						return;
					}

					Trace.TraceInformation(
						string.Concat(
							"Patching hintpath to '",
							newReference,
							"'..."));

					hintPathNode.InnerText = newReference;

				}
			}
			projectDoc.Save(projectFile);
		}

		public void RemoveVersionSpecification(string projectFile)
		{
			var projectDoc = new XmlDocument();
			projectDoc.Load(projectFile);

			var xmlnsmgr = new XmlNamespaceManager(projectDoc.NameTable);
			xmlnsmgr.AddNamespace(
				"msbuild",
				"http://schemas.microsoft.com/developer/msbuild/2003");

			var referenceNodes =
				projectDoc.SelectNodes(
					"/msbuild:Project/msbuild:ItemGroup/msbuild:Reference",
					xmlnsmgr);
			if (referenceNodes == null)
			{
				Trace.TraceInformation("No references found...");
				return;
			}
			foreach (XmlNode referenceNode in referenceNodes)
			{
				var include = referenceNode.Attributes["Include"].Value;

				var commaIndex = include.IndexOf(",");
				if (commaIndex &amp;gt; -1)
				{
					var reference = include.Substring(0, commaIndex);
					
					Trace.TraceInformation(
						string.Concat(
							"Unversion reference to '",
							reference,
							"'..."));
					referenceNode.Attributes["Include"].Value = reference;

				}
			}
			projectDoc.Save(projectFile);
		}

	}
}
&lt;/pre&gt;
&lt;p&gt;
The resulting manifest shows, that the Assembly is nonetheless references with a specific
version:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://lennybacon.com/content/binary/Windows-Live-Writer/Versioning_10F83/image_10.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lennybacon.com/content/binary/Windows-Live-Writer/Versioning_10F83/image_thumb_4.png" width="244" height="142"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://lennybacon.com/aggbug.ashx?id=3f1ee83b-7bee-4893-a8fa-cdcc67d64d03" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://devcoach.com"&gt;devcoach.com&lt;/a&gt;. </description>
      <comments>http://lennybacon.com/CommentView,guid,3f1ee83b-7bee-4893-a8fa-cdcc67d64d03.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://lennybacon.com/Trackback.aspx?guid=5acc291d-fde1-443c-ab90-0ab7e4054e75</trackback:ping>
      <pingback:server>http://lennybacon.com/pingback.aspx</pingback:server>
      <pingback:target>http://lennybacon.com/PermaLink,guid,5acc291d-fde1-443c-ab90-0ab7e4054e75.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://lennybacon.com/CommentView,guid,5acc291d-fde1-443c-ab90-0ab7e4054e75.aspx</wfw:comment>
      <wfw:commentRss>http://lennybacon.com/SyndicationService.asmx/GetEntryCommentsRss?guid=5acc291d-fde1-443c-ab90-0ab7e4054e75</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The good thing about JavaScript is that its network/ajax calls are asynchronous. The
bad thing about JavaScript is that its network/ajax calls are asynchronous. 
</p>
        <p>
It’s bad because nested calls increase complexity. Look at the following sample methods:
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:cfc567f6-d686-4e17-924e-7cedacc72c64" class="wlWriterEditableSmartContent">
          <pre style=" width: 472px; height: 327px;background-color:White;overflow: auto;;font-family:Consolas;font-size:12">
            <div>
              <!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
              <span style="color: #0000FF;">function</span>
              <span style="color: #000000;"> f1(callback)
{ console.log(</span>
              <span style="color: #000000;">'</span>
              <span style="color: #000000;">f1</span>
              <span style="color: #000000;">'</span>
              <span style="color: #000000;">); </span>
              <span style="color: #0000FF;">if</span>
              <span style="color: #000000;"> (callback </span>
              <span style="color: #000000;">!=</span>
              <span style="color: #000000;">
              </span>
              <span style="color: #0000FF;">null</span>
              <span style="color: #000000;">)
{ console.log(</span>
              <span style="color: #000000;">'</span>
              <span style="color: #000000;">hasCallback</span>
              <span style="color: #000000;">'</span>
              <span style="color: #000000;">);
callback(); } } </span>
              <span style="color: #0000FF;">function</span>
              <span style="color: #000000;"> f2(callback)
{ console.log(</span>
              <span style="color: #000000;">'</span>
              <span style="color: #000000;">f2</span>
              <span style="color: #000000;">'</span>
              <span style="color: #000000;">); </span>
              <span style="color: #0000FF;">if</span>
              <span style="color: #000000;"> (callback </span>
              <span style="color: #000000;">!=</span>
              <span style="color: #000000;">
              </span>
              <span style="color: #0000FF;">null</span>
              <span style="color: #000000;">)
{ console.log(</span>
              <span style="color: #000000;">'</span>
              <span style="color: #000000;">hasCallback</span>
              <span style="color: #000000;">'</span>
              <span style="color: #000000;">);
callback(); } } </span>
              <span style="color: #0000FF;">function</span>
              <span style="color: #000000;"> f3(callback)
{ console.log(</span>
              <span style="color: #000000;">'</span>
              <span style="color: #000000;">f3</span>
              <span style="color: #000000;">'</span>
              <span style="color: #000000;">); </span>
              <span style="color: #0000FF;">if</span>
              <span style="color: #000000;"> (callback </span>
              <span style="color: #000000;">!=</span>
              <span style="color: #000000;">
              </span>
              <span style="color: #0000FF;">null</span>
              <span style="color: #000000;">)
{ console.log(</span>
              <span style="color: #000000;">'</span>
              <span style="color: #000000;">hasCallback</span>
              <span style="color: #000000;">'</span>
              <span style="color: #000000;">);
callback(); } }</span>
            </div>
          </pre>
          <!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com -->
        </div>
        <p>
The calls should be executed one after another. 
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:87736140-3788-4cd4-a536-a23635220499" class="wlWriterEditableSmartContent">
          <pre style=" width: 472px; height: 192px;background-color:White;overflow: auto;;font-family:Consolas;font-size:12">
            <div>
              <!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
              <span style="color: #000000;">f3( </span>
              <span style="color: #0000FF;">function</span>
              <span style="color: #000000;">(){ </span>
              <span style="color: #0000FF;">return</span>
              <span style="color: #000000;"> f2( </span>
              <span style="color: #0000FF;">function</span>
              <span style="color: #000000;">()
{ </span>
              <span style="color: #0000FF;">return</span>
              <span style="color: #000000;"> f3();
} ); } );</span>
            </div>
          </pre>
          <!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com -->
        </div>
        <p>
Reading or even worst writing this makes me not happy. I don’t like the explicit nesting.
It makes the code feeling complicate. It often don’t fits in the frame of 80 chars
per line <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-sadsmile" alt="Sad smile" src="http://lennybacon.com/content/binary/Windows-Live-Writer/Chaining-asynchronous-javascript-call_EB82/wlEmoticon-sadsmile_2.png" />.
</p>
        <p>
Today I’ve put together a small helper class that collects calls and executes them
by chaining them as callbacks.
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:bc78f0cc-8506-455e-9306-6ce876c2cf2b" class="wlWriterEditableSmartContent">
          <pre style=" width: 504px; height: 407px;background-color:White;overflow: auto;;font-family:Consolas;font-size:12">
            <div>
              <!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
              <span style="color: #0000FF;">var</span>
              <span style="color: #000000;"> devcoach </span>
              <span style="color: #000000;">=</span>
              <span style="color: #000000;"> devcoach </span>
              <span style="color: #000000;">||</span>
              <span style="color: #000000;"> {};
devcoach.CallChain </span>
              <span style="color: #000000;">=</span>
              <span style="color: #000000;">
              </span>
              <span style="color: #0000FF;">function</span>
              <span style="color: #000000;"> ()
{ </span>
              <span style="color: #0000FF;">var</span>
              <span style="color: #000000;"> cs </span>
              <span style="color: #000000;">=</span>
              <span style="color: #000000;"> []; </span>
              <span style="color: #0000FF;">this</span>
              <span style="color: #000000;">.add </span>
              <span style="color: #000000;">=</span>
              <span style="color: #000000;">
              </span>
              <span style="color: #0000FF;">function</span>
              <span style="color: #000000;"> (call)
{ cs.push(call); }; </span>
              <span style="color: #0000FF;">this</span>
              <span style="color: #000000;">.execute </span>
              <span style="color: #000000;">=</span>
              <span style="color: #000000;">
              </span>
              <span style="color: #0000FF;">function</span>
              <span style="color: #000000;"> ()
{ </span>
              <span style="color: #0000FF;">var</span>
              <span style="color: #000000;"> wrap </span>
              <span style="color: #000000;">=</span>
              <span style="color: #000000;">
              </span>
              <span style="color: #0000FF;">function</span>
              <span style="color: #000000;"> (call,
callback) { </span>
              <span style="color: #0000FF;">return</span>
              <span style="color: #000000;">
              </span>
              <span style="color: #0000FF;">function</span>
              <span style="color: #000000;"> ()
{ call(callback); }; }; </span>
              <span style="color: #0000FF;">for</span>
              <span style="color: #000000;"> (</span>
              <span style="color: #0000FF;">var</span>
              <span style="color: #000000;"> i </span>
              <span style="color: #000000;">=</span>
              <span style="color: #000000;"> cs.length</span>
              <span style="color: #000000;">-</span>
              <span style="color: #000000;">1</span>
              <span style="color: #000000;">;
i </span>
              <span style="color: #000000;">&gt;</span>
              <span style="color: #000000;">
              </span>
              <span style="color: #000000;">-</span>
              <span style="color: #000000;">1</span>
              <span style="color: #000000;">;
i</span>
              <span style="color: #000000;">--</span>
              <span style="color: #000000;">) { cs[i] </span>
              <span style="color: #000000;">=</span>
              <span style="color: #000000;"> wrap(
cs[i], i </span>
              <span style="color: #000000;">&lt;</span>
              <span style="color: #000000;"> cs.length </span>
              <span style="color: #000000;">-</span>
              <span style="color: #000000;">
              </span>
              <span style="color: #000000;">1</span>
              <span style="color: #000000;">
              </span>
              <span style="color: #000000;">?</span>
              <span style="color: #000000;"> cs[i </span>
              <span style="color: #000000;">+</span>
              <span style="color: #000000;">
              </span>
              <span style="color: #000000;">1</span>
              <span style="color: #000000;">]
: </span>
              <span style="color: #0000FF;">null</span>
              <span style="color: #000000;">);
} cs[</span>
              <span style="color: #000000;">0</span>
              <span style="color: #000000;">]();
}; };</span>
            </div>
          </pre>
          <!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com -->
        </div>
        <p>
This few lines now let you write a more clear and easy to read calls automatically
being nested calling the follower as callback.
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:aabe8436-1e7f-4253-9c74-047bb1f86c5a" class="wlWriterEditableSmartContent">
          <pre style=" width: 504px; height: 115px;background-color:White;overflow: auto;;font-family:Consolas;font-size:12">
            <div>
              <!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
              <span style="color: #0000FF;">var</span>
              <span style="color: #000000;"> cc </span>
              <span style="color: #000000;">=</span>
              <span style="color: #000000;">
              </span>
              <span style="color: #0000FF;">new</span>
              <span style="color: #000000;"> devcoach.CallChain();
cc.add(f1); cc.add(f2); cc.add(f3); cc.execute();</span>
            </div>
          </pre>
          <!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com -->
        </div>
        <img width="0" height="0" src="http://lennybacon.com/aggbug.ashx?id=5acc291d-fde1-443c-ab90-0ab7e4054e75" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://devcoach.com">devcoach.com</a>. 
</body>
      <title>Chaining asynchronous javascript calls</title>
      <guid isPermaLink="false">http://lennybacon.com/PermaLink,guid,5acc291d-fde1-443c-ab90-0ab7e4054e75.aspx</guid>
      <link>http://lennybacon.com/2011/10/03/ChainingAsynchronousJavascriptCalls.aspx</link>
      <pubDate>Mon, 03 Oct 2011 15:11:20 GMT</pubDate>
      <description>&lt;p&gt;
The good thing about JavaScript is that its network/ajax calls are asynchronous. The
bad thing about JavaScript is that its network/ajax calls are asynchronous. 
&lt;/p&gt;
&lt;p&gt;
It’s bad because nested calls increase complexity. Look at the following sample methods:
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:cfc567f6-d686-4e17-924e-7cedacc72c64" class="wlWriterEditableSmartContent"&gt;&lt;pre style=" width: 472px; height: 327px;background-color:White;overflow: auto;;font-family:Consolas;font-size:12"&gt;
&lt;div&gt;
&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #0000FF;"&gt;function&lt;/span&gt;&lt;span style="color: #000000;"&gt; f1(callback)
{ console.log(&lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;f1&lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;); &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;if&lt;/span&gt;&lt;span style="color: #000000;"&gt; (callback &lt;/span&gt;&lt;span style="color: #000000;"&gt;!=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;null&lt;/span&gt;&lt;span style="color: #000000;"&gt;)
{ console.log(&lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;hasCallback&lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;);
callback(); } } &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;function&lt;/span&gt;&lt;span style="color: #000000;"&gt; f2(callback)
{ console.log(&lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;f2&lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;); &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;if&lt;/span&gt;&lt;span style="color: #000000;"&gt; (callback &lt;/span&gt;&lt;span style="color: #000000;"&gt;!=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;null&lt;/span&gt;&lt;span style="color: #000000;"&gt;)
{ console.log(&lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;hasCallback&lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;);
callback(); } } &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;function&lt;/span&gt;&lt;span style="color: #000000;"&gt; f3(callback)
{ console.log(&lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;f3&lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;); &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;if&lt;/span&gt;&lt;span style="color: #000000;"&gt; (callback &lt;/span&gt;&lt;span style="color: #000000;"&gt;!=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;null&lt;/span&gt;&lt;span style="color: #000000;"&gt;)
{ console.log(&lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;hasCallback&lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;);
callback(); } }&lt;/span&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;
&lt;/div&gt;
&lt;p&gt;
The calls should be executed one after another. 
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:87736140-3788-4cd4-a536-a23635220499" class="wlWriterEditableSmartContent"&gt;&lt;pre style=" width: 472px; height: 192px;background-color:White;overflow: auto;;font-family:Consolas;font-size:12"&gt;
&lt;div&gt;
&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #000000;"&gt;f3( &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;function&lt;/span&gt;&lt;span style="color: #000000;"&gt;(){ &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; f2( &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;function&lt;/span&gt;&lt;span style="color: #000000;"&gt;()
{ &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; f3();
} ); } );&lt;/span&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;
&lt;/div&gt;
&lt;p&gt;
Reading or even worst writing this makes me not happy. I don’t like the explicit nesting.
It makes the code feeling complicate. It often don’t fits in the frame of 80 chars
per line &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-sadsmile" alt="Sad smile" src="http://lennybacon.com/content/binary/Windows-Live-Writer/Chaining-asynchronous-javascript-call_EB82/wlEmoticon-sadsmile_2.png"&gt;.
&lt;/p&gt;
&lt;p&gt;
Today I’ve put together a small helper class that collects calls and executes them
by chaining them as callbacks.
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:bc78f0cc-8506-455e-9306-6ce876c2cf2b" class="wlWriterEditableSmartContent"&gt;&lt;pre style=" width: 504px; height: 407px;background-color:White;overflow: auto;;font-family:Consolas;font-size:12"&gt;
&lt;div&gt;
&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #0000FF;"&gt;var&lt;/span&gt;&lt;span style="color: #000000;"&gt; devcoach &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; devcoach &lt;/span&gt;&lt;span style="color: #000000;"&gt;||&lt;/span&gt;&lt;span style="color: #000000;"&gt; {};
devcoach.CallChain &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;function&lt;/span&gt;&lt;span style="color: #000000;"&gt; ()
{ &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;var&lt;/span&gt;&lt;span style="color: #000000;"&gt; cs &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; []; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;this&lt;/span&gt;&lt;span style="color: #000000;"&gt;.add &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;function&lt;/span&gt;&lt;span style="color: #000000;"&gt; (call)
{ cs.push(call); }; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;this&lt;/span&gt;&lt;span style="color: #000000;"&gt;.execute &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;function&lt;/span&gt;&lt;span style="color: #000000;"&gt; ()
{ &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;var&lt;/span&gt;&lt;span style="color: #000000;"&gt; wrap &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;function&lt;/span&gt;&lt;span style="color: #000000;"&gt; (call,
callback) { &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;function&lt;/span&gt;&lt;span style="color: #000000;"&gt; ()
{ call(callback); }; }; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;for&lt;/span&gt;&lt;span style="color: #000000;"&gt; (&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;var&lt;/span&gt;&lt;span style="color: #000000;"&gt; i &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; cs.length&lt;/span&gt;&lt;span style="color: #000000;"&gt;-&lt;/span&gt;&lt;span style="color: #000000;"&gt;1&lt;/span&gt;&lt;span style="color: #000000;"&gt;;
i &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;-&lt;/span&gt;&lt;span style="color: #000000;"&gt;1&lt;/span&gt;&lt;span style="color: #000000;"&gt;;
i&lt;/span&gt;&lt;span style="color: #000000;"&gt;--&lt;/span&gt;&lt;span style="color: #000000;"&gt;) { cs[i] &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; wrap(
cs[i], i &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; cs.length &lt;/span&gt;&lt;span style="color: #000000;"&gt;-&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;1&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;?&lt;/span&gt;&lt;span style="color: #000000;"&gt; cs[i &lt;/span&gt;&lt;span style="color: #000000;"&gt;+&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;1&lt;/span&gt;&lt;span style="color: #000000;"&gt;]
: &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;null&lt;/span&gt;&lt;span style="color: #000000;"&gt;);
} cs[&lt;/span&gt;&lt;span style="color: #000000;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;]();
}; };&lt;/span&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;
&lt;/div&gt;
&lt;p&gt;
This few lines now let you write a more clear and easy to read calls automatically
being nested calling the follower as callback.
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:aabe8436-1e7f-4253-9c74-047bb1f86c5a" class="wlWriterEditableSmartContent"&gt;&lt;pre style=" width: 504px; height: 115px;background-color:White;overflow: auto;;font-family:Consolas;font-size:12"&gt;
&lt;div&gt;
&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #0000FF;"&gt;var&lt;/span&gt;&lt;span style="color: #000000;"&gt; cc &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; devcoach.CallChain();
cc.add(f1); cc.add(f2); cc.add(f3); cc.execute();&lt;/span&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://lennybacon.com/aggbug.ashx?id=5acc291d-fde1-443c-ab90-0ab7e4054e75" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://devcoach.com"&gt;devcoach.com&lt;/a&gt;. </description>
      <comments>http://lennybacon.com/CommentView,guid,5acc291d-fde1-443c-ab90-0ab7e4054e75.aspx</comments>
      <category>JavaScript</category>
    </item>
    <item>
      <trackback:ping>http://lennybacon.com/Trackback.aspx?guid=b3a57827-5576-4045-879f-4975b9617d65</trackback:ping>
      <pingback:server>http://lennybacon.com/pingback.aspx</pingback:server>
      <pingback:target>http://lennybacon.com/PermaLink,guid,b3a57827-5576-4045-879f-4975b9617d65.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://lennybacon.com/CommentView,guid,b3a57827-5576-4045-879f-4975b9617d65.aspx</wfw:comment>
      <wfw:commentRss>http://lennybacon.com/SyndicationService.asmx/GetEntryCommentsRss?guid=b3a57827-5576-4045-879f-4975b9617d65</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
It’s community summer again. The same procedure as every year. In the middle there
is some refreshing <a href="http://www.ice-lingen.de/" target="_blank">ICE</a>.
</p>
        <p>
The ICE-Conference in <a href="http://maps.google.de/maps?q=lingen&amp;um=1&amp;ie=UTF-8&amp;hq=&amp;hnear=0x47b787b7b53dbb63:0x426cf776300b950,Lingen&amp;gl=de&amp;ei=5qpUTvu7L4aVswaMpOUN&amp;sa=X&amp;oi=geocode_result&amp;ct=image&amp;resnum=1&amp;ved=0CC0Q8gEwAA" target="_blank">Lingen</a> is
something special to me because it is an <a href="http://en.wikipedia.org/wiki/System_administrator" target="_blank">admin</a> event.
I’m a developer. Maybe It’s caused by my roots – yeh, I was an admin once. Maybe caused
by the fact that I tend to build bridges between admins and devs and build my developments
aware of infrastructure. 
</p>
        <p>
          <a href="http://lennybacon.com/content/binary/Windows-Live-Writer/ICE-Lingen-2011_8700/image_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lennybacon.com/content/binary/Windows-Live-Writer/ICE-Lingen-2011_8700/image_thumb.png" width="355" height="226" />
          </a>
        </p>
        <p>
This year I spoke about professional development on the client stack. I explained
Javascripts OOP concepts from the .NET development perspective. Introduced <a href="http://jquery.com/" target="_blank">JQuery</a> and
explained how it’s plugin model works.  
</p>
        <p>
The session was rated along with others as 3rd bets of the conference – Thanks for
attending and voting!
</p>
        <p>
          <a href="http://lennybacon.com/content/binary/Windows-Live-Writer/ICE-Lingen-2011_8700/image_4.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lennybacon.com/content/binary/Windows-Live-Writer/ICE-Lingen-2011_8700/image_thumb_1.png" width="359" height="220" />
          </a>
        </p>
        <p>
As always the networking with the *admin guys* was as great as the after-ice-party.
I really enjoyed to meet up with a lot of people I’ve haven’t seen for a while.
</p>
        <p>
Last but not least: Many thanks to <a href="http://blog.ice-lingen.de/" target="_blank">Nicki
Wruck</a> and the <a href="http://www.ice-lingen.de/pages/de/site.php?page=backbone" target="_blank">ICE-Team</a> for
this great event.
</p>
        <img width="0" height="0" src="http://lennybacon.com/aggbug.ashx?id=b3a57827-5576-4045-879f-4975b9617d65" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://devcoach.com">devcoach.com</a>. 
</body>
      <title>ICE Lingen 2011</title>
      <guid isPermaLink="false">http://lennybacon.com/PermaLink,guid,b3a57827-5576-4045-879f-4975b9617d65.aspx</guid>
      <link>http://lennybacon.com/2011/08/24/ICELingen2011.aspx</link>
      <pubDate>Wed, 24 Aug 2011 10:46:25 GMT</pubDate>
      <description>&lt;p&gt;
It’s community summer again. The same procedure as every year. In the middle there
is some refreshing &lt;a href="http://www.ice-lingen.de/" target="_blank"&gt;ICE&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
The ICE-Conference in &lt;a href="http://maps.google.de/maps?q=lingen&amp;amp;um=1&amp;amp;ie=UTF-8&amp;amp;hq=&amp;amp;hnear=0x47b787b7b53dbb63:0x426cf776300b950,Lingen&amp;amp;gl=de&amp;amp;ei=5qpUTvu7L4aVswaMpOUN&amp;amp;sa=X&amp;amp;oi=geocode_result&amp;amp;ct=image&amp;amp;resnum=1&amp;amp;ved=0CC0Q8gEwAA" target="_blank"&gt;Lingen&lt;/a&gt; is
something special to me because it is an &lt;a href="http://en.wikipedia.org/wiki/System_administrator" target="_blank"&gt;admin&lt;/a&gt; event.
I’m a developer. Maybe It’s caused by my roots – yeh, I was an admin once. Maybe caused
by the fact that I tend to build bridges between admins and devs and build my developments
aware of infrastructure. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://lennybacon.com/content/binary/Windows-Live-Writer/ICE-Lingen-2011_8700/image_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lennybacon.com/content/binary/Windows-Live-Writer/ICE-Lingen-2011_8700/image_thumb.png" width="355" height="226"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
This year I spoke about professional development on the client stack. I explained
Javascripts OOP concepts from the .NET development perspective. Introduced &lt;a href="http://jquery.com/" target="_blank"&gt;JQuery&lt;/a&gt; and
explained how it’s plugin model works.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
The session was rated along with others as 3rd bets of the conference – Thanks for
attending and voting!
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://lennybacon.com/content/binary/Windows-Live-Writer/ICE-Lingen-2011_8700/image_4.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lennybacon.com/content/binary/Windows-Live-Writer/ICE-Lingen-2011_8700/image_thumb_1.png" width="359" height="220"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
As always the networking with the *admin guys* was as great as the after-ice-party.
I really enjoyed to meet up with a lot of people I’ve haven’t seen for a while.
&lt;/p&gt;
&lt;p&gt;
Last but not least: Many thanks to &lt;a href="http://blog.ice-lingen.de/" target="_blank"&gt;Nicki
Wruck&lt;/a&gt; and the &lt;a href="http://www.ice-lingen.de/pages/de/site.php?page=backbone" target="_blank"&gt;ICE-Team&lt;/a&gt; for
this great event.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://lennybacon.com/aggbug.ashx?id=b3a57827-5576-4045-879f-4975b9617d65" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://devcoach.com"&gt;devcoach.com&lt;/a&gt;. </description>
      <comments>http://lennybacon.com/CommentView,guid,b3a57827-5576-4045-879f-4975b9617d65.aspx</comments>
      <category>Event</category>
      <category>JavaScript</category>
      <category>JQuery</category>
    </item>
    <item>
      <trackback:ping>http://lennybacon.com/Trackback.aspx?guid=d3917597-b417-4439-be87-34df18d47342</trackback:ping>
      <pingback:server>http://lennybacon.com/pingback.aspx</pingback:server>
      <pingback:target>http://lennybacon.com/PermaLink,guid,d3917597-b417-4439-be87-34df18d47342.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://lennybacon.com/CommentView,guid,d3917597-b417-4439-be87-34df18d47342.aspx</wfw:comment>
      <wfw:commentRss>http://lennybacon.com/SyndicationService.asmx/GetEntryCommentsRss?guid=d3917597-b417-4439-be87-34df18d47342</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://lennybacon.com/content/binary/Windows-Live-Writer/0a2b0179142d_F5D0/image_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lennybacon.com/content/binary/Windows-Live-Writer/0a2b0179142d_F5D0/image_thumb.png" width="589" height="382" />
          </a>
        </p>
        <p>
Maybe something x64? Maybe something faster? 
</p>
        <p>
Who knows? For now I’m just dreaming…
</p>
        <img width="0" height="0" src="http://lennybacon.com/aggbug.ashx?id=d3917597-b417-4439-be87-34df18d47342" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://devcoach.com">devcoach.com</a>. 
</body>
      <title>Will Microsoft reveal a new IDE at the BUILD conference?</title>
      <guid isPermaLink="false">http://lennybacon.com/PermaLink,guid,d3917597-b417-4439-be87-34df18d47342.aspx</guid>
      <link>http://lennybacon.com/2011/08/16/WillMicrosoftRevealANewIDEAtTheBUILDConference.aspx</link>
      <pubDate>Tue, 16 Aug 2011 15:30:59 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://lennybacon.com/content/binary/Windows-Live-Writer/0a2b0179142d_F5D0/image_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lennybacon.com/content/binary/Windows-Live-Writer/0a2b0179142d_F5D0/image_thumb.png" width="589" height="382"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Maybe something x64? Maybe something faster? 
&lt;/p&gt;
&lt;p&gt;
Who knows? For now I’m just dreaming…
&lt;/p&gt;
&lt;img width="0" height="0" src="http://lennybacon.com/aggbug.ashx?id=d3917597-b417-4439-be87-34df18d47342" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://devcoach.com"&gt;devcoach.com&lt;/a&gt;. </description>
      <comments>http://lennybacon.com/CommentView,guid,d3917597-b417-4439-be87-34df18d47342.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://lennybacon.com/Trackback.aspx?guid=ec8a23f9-7942-4b74-b8e5-44f43af0cb02</trackback:ping>
      <pingback:server>http://lennybacon.com/pingback.aspx</pingback:server>
      <pingback:target>http://lennybacon.com/PermaLink,guid,ec8a23f9-7942-4b74-b8e5-44f43af0cb02.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://lennybacon.com/CommentView,guid,ec8a23f9-7942-4b74-b8e5-44f43af0cb02.aspx</wfw:comment>
      <wfw:commentRss>http://lennybacon.com/SyndicationService.asmx/GetEntryCommentsRss?guid=ec8a23f9-7942-4b74-b8e5-44f43af0cb02</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Since the year 2005 the non-commercial organization <a href="http://www.justcommunity.de/" target="_blank">JustCommunity
e.V.</a> organises once a year the <a href="http://www.nrwconf.de/" target="_blank">NRW
Conf</a> community event. Over the time it has become one of the biggest community
events in Germany.
</p>
        <p>
This years conference will be on the 8th and 9th of September located in <a href="http://maps.google.de/maps?q=wuppertal&amp;um=1&amp;ie=UTF-8&amp;hq=&amp;hnear=0x47b8d63a5c61d467:0x42760fc4a2a7440,Wuppertal&amp;gl=de&amp;ei=9ow6Tq_QEYuVswbYvaCKAQ&amp;sa=X&amp;oi=geocode_result&amp;ct=image&amp;resnum=3&amp;ved=0CEIQ8gEwAg" target="_blank">Wuppertal,
Germany</a>.
</p>
        <p>
We will host <a href="http://www.nrwconf.de/en/Conference/NrwConf2011/Speakers" target="_blank">over
20 speakers</a> and <a href="http://www.nrwconf.de/en/Conference/NrwConf2011/Sessions" target="_blank">sessions</a> from
Germany and Europe, and as last year there will be a workshop day upfront:
</p>
        <ul>
          <li>
            <a href="http://www.nrwconf.de/en/Conference/NrwConf2011/Event/MvcWorkshop">ASP.NET
MVC</a>
          </li>
          <li>
            <a href="http://www.nrwconf.de/en/Conference/NrwConf2011/Event/SCRUMWorkshop">SCRUM</a>
          </li>
          <li>
            <a href="http://www.nrwconf.de/en/Conference/NrwConf2011/Event/PowerShellWorkshop">PowerShell</a>
          </li>
        </ul>
        <p>
Last but not least let me throw in some buzzwords, before you head over to the registration:
Windows Phone 7.5, Agile, SQL Server, ASP.NET MVC, REST, Windows Azure, Rails, SCRUM,
Powershell, Sharepoint, Oracle, Kinect, MS Office, Git, Performance-Analysis, TMG,
UAG, FEP, FPE, FSSP, FPSMC, FIM, FOPE.
</p>
        <p>
          <a href="http://www.nrwconf.de/en/Conference/NrwConf2011/SignUp">Click here to sign
up…</a>
        </p>
        <img width="0" height="0" src="http://lennybacon.com/aggbug.ashx?id=ec8a23f9-7942-4b74-b8e5-44f43af0cb02" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://devcoach.com">devcoach.com</a>. 
</body>
      <title>NRW Conf 2011 community conference: The doors are open</title>
      <guid isPermaLink="false">http://lennybacon.com/PermaLink,guid,ec8a23f9-7942-4b74-b8e5-44f43af0cb02.aspx</guid>
      <link>http://lennybacon.com/2011/08/04/NRWConf2011CommunityConferenceTheDoorsAreOpen.aspx</link>
      <pubDate>Thu, 04 Aug 2011 12:21:59 GMT</pubDate>
      <description>&lt;p&gt;
Since the year 2005 the non-commercial organization &lt;a href="http://www.justcommunity.de/" target="_blank"&gt;JustCommunity
e.V.&lt;/a&gt; organises once a year the &lt;a href="http://www.nrwconf.de/" target="_blank"&gt;NRW
Conf&lt;/a&gt; community event. Over the time it has become one of the biggest community
events in Germany.
&lt;/p&gt;
&lt;p&gt;
This years conference will be on the 8th and 9th of September located in &lt;a href="http://maps.google.de/maps?q=wuppertal&amp;amp;um=1&amp;amp;ie=UTF-8&amp;amp;hq=&amp;amp;hnear=0x47b8d63a5c61d467:0x42760fc4a2a7440,Wuppertal&amp;amp;gl=de&amp;amp;ei=9ow6Tq_QEYuVswbYvaCKAQ&amp;amp;sa=X&amp;amp;oi=geocode_result&amp;amp;ct=image&amp;amp;resnum=3&amp;amp;ved=0CEIQ8gEwAg" target="_blank"&gt;Wuppertal,
Germany&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
We will host &lt;a href="http://www.nrwconf.de/en/Conference/NrwConf2011/Speakers" target="_blank"&gt;over
20 speakers&lt;/a&gt; and &lt;a href="http://www.nrwconf.de/en/Conference/NrwConf2011/Sessions" target="_blank"&gt;sessions&lt;/a&gt; from
Germany and Europe, and as last year there will be a workshop day upfront:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.nrwconf.de/en/Conference/NrwConf2011/Event/MvcWorkshop"&gt;ASP.NET
MVC&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://www.nrwconf.de/en/Conference/NrwConf2011/Event/SCRUMWorkshop"&gt;SCRUM&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://www.nrwconf.de/en/Conference/NrwConf2011/Event/PowerShellWorkshop"&gt;PowerShell&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Last but not least let me throw in some buzzwords, before you head over to the registration:
Windows Phone 7.5, Agile, SQL Server, ASP.NET MVC, REST, Windows Azure, Rails, SCRUM,
Powershell, Sharepoint, Oracle, Kinect, MS Office, Git, Performance-Analysis, TMG,
UAG, FEP, FPE, FSSP, FPSMC, FIM, FOPE.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.nrwconf.de/en/Conference/NrwConf2011/SignUp"&gt;Click here to sign
up…&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://lennybacon.com/aggbug.ashx?id=ec8a23f9-7942-4b74-b8e5-44f43af0cb02" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://devcoach.com"&gt;devcoach.com&lt;/a&gt;. </description>
      <comments>http://lennybacon.com/CommentView,guid,ec8a23f9-7942-4b74-b8e5-44f43af0cb02.aspx</comments>
      <category>ASP.NET</category>
      <category>C#</category>
      <category>Event</category>
      <category>MVC</category>
      <category>Wuppertal</category>
    </item>
    <item>
      <trackback:ping>http://lennybacon.com/Trackback.aspx?guid=dddf09a9-c70a-4a4e-8d30-25d9ed76e06b</trackback:ping>
      <pingback:server>http://lennybacon.com/pingback.aspx</pingback:server>
      <pingback:target>http://lennybacon.com/PermaLink,guid,dddf09a9-c70a-4a4e-8d30-25d9ed76e06b.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://lennybacon.com/CommentView,guid,dddf09a9-c70a-4a4e-8d30-25d9ed76e06b.aspx</wfw:comment>
      <wfw:commentRss>http://lennybacon.com/SyndicationService.asmx/GetEntryCommentsRss?guid=dddf09a9-c70a-4a4e-8d30-25d9ed76e06b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://lennybacon.com/content/binary/Windows-Live-Writer/Skype--0_FFDF/image_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lennybacon.com/content/binary/Windows-Live-Writer/Skype--0_FFDF/image_thumb.png" width="244" height="154" />
          </a>
        </p>
        <img width="0" height="0" src="http://lennybacon.com/aggbug.ashx?id=dddf09a9-c70a-4a4e-8d30-25d9ed76e06b" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://devcoach.com">devcoach.com</a>. 
</body>
      <title>Skype / 0</title>
      <guid isPermaLink="false">http://lennybacon.com/PermaLink,guid,dddf09a9-c70a-4a4e-8d30-25d9ed76e06b.aspx</guid>
      <link>http://lennybacon.com/2011/07/27/Skype0.aspx</link>
      <pubDate>Wed, 27 Jul 2011 16:11:48 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://lennybacon.com/content/binary/Windows-Live-Writer/Skype--0_FFDF/image_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lennybacon.com/content/binary/Windows-Live-Writer/Skype--0_FFDF/image_thumb.png" width="244" height="154"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://lennybacon.com/aggbug.ashx?id=dddf09a9-c70a-4a4e-8d30-25d9ed76e06b" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://devcoach.com"&gt;devcoach.com&lt;/a&gt;. </description>
      <comments>http://lennybacon.com/CommentView,guid,dddf09a9-c70a-4a4e-8d30-25d9ed76e06b.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://lennybacon.com/Trackback.aspx?guid=4ea60594-2677-414a-a5ba-7fea530a3a04</trackback:ping>
      <pingback:server>http://lennybacon.com/pingback.aspx</pingback:server>
      <pingback:target>http://lennybacon.com/PermaLink,guid,4ea60594-2677-414a-a5ba-7fea530a3a04.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://lennybacon.com/CommentView,guid,4ea60594-2677-414a-a5ba-7fea530a3a04.aspx</wfw:comment>
      <wfw:commentRss>http://lennybacon.com/SyndicationService.asmx/GetEntryCommentsRss?guid=4ea60594-2677-414a-a5ba-7fea530a3a04</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Especially in core libraries I tend to not reference System.Web.dll to keep the .NET
Framework Client Profile as an option of compilation. I use the following code to
figure out if the current running application is a web application
</p>
        <pre>namespace devcoach.Extensions
{
    public static partial class AppDomainExtensions
    {
        public static bool IsWebApp(this AppDomain appDomain)
        {
            var configFile = (string)appDomain.GetData("APP_CONFIG_FILE");
            if (string.IsNullOrEmpty(configFile)) return false;
            return Path.GetFileNameWithoutExtension(configFile).Equals(
                "WEB", 
                StringComparison.OrdinalIgnoreCase);
        }
    }
}

</pre>
        <img width="0" height="0" src="http://lennybacon.com/aggbug.ashx?id=4ea60594-2677-414a-a5ba-7fea530a3a04" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://devcoach.com">devcoach.com</a>. 
</body>
      <title>Figure out if the current running application is a web application without a reference to System.Web.dll</title>
      <guid isPermaLink="false">http://lennybacon.com/PermaLink,guid,4ea60594-2677-414a-a5ba-7fea530a3a04.aspx</guid>
      <link>http://lennybacon.com/2011/07/06/FigureOutIfTheCurrentRunningApplicationIsAWebApplicationWithoutAReferenceToSystemWebdll.aspx</link>
      <pubDate>Wed, 06 Jul 2011 00:14:48 GMT</pubDate>
      <description>&lt;p&gt;
Especially in core libraries I tend to not reference System.Web.dll to keep the .NET
Framework Client Profile as an option of compilation. I use the following code to
figure out if the current running application is a web application
&lt;/p&gt;
&lt;pre&gt;namespace devcoach.Extensions
{
    public static partial class AppDomainExtensions
    {
        public static bool IsWebApp(this AppDomain appDomain)
        {
            var configFile = (string)appDomain.GetData("APP_CONFIG_FILE");
            if (string.IsNullOrEmpty(configFile)) return false;
            return Path.GetFileNameWithoutExtension(configFile).Equals(
                "WEB", 
                StringComparison.OrdinalIgnoreCase);
        }
    }
}

&lt;/pre&gt;&lt;img width="0" height="0" src="http://lennybacon.com/aggbug.ashx?id=4ea60594-2677-414a-a5ba-7fea530a3a04" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://devcoach.com"&gt;devcoach.com&lt;/a&gt;. </description>
      <comments>http://lennybacon.com/CommentView,guid,4ea60594-2677-414a-a5ba-7fea530a3a04.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://lennybacon.com/Trackback.aspx?guid=a30b2a48-2aa8-4052-93e5-ba5323296c32</trackback:ping>
      <pingback:server>http://lennybacon.com/pingback.aspx</pingback:server>
      <pingback:target>http://lennybacon.com/PermaLink,guid,a30b2a48-2aa8-4052-93e5-ba5323296c32.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://lennybacon.com/CommentView,guid,a30b2a48-2aa8-4052-93e5-ba5323296c32.aspx</wfw:comment>
      <wfw:commentRss>http://lennybacon.com/SyndicationService.asmx/GetEntryCommentsRss?guid=a30b2a48-2aa8-4052-93e5-ba5323296c32</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://lennybacon.com/content/binary/Windows-Live-Writer/First-issue-on-my-workstation-while-ru.f_7693/image_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lennybacon.com/content/binary/Windows-Live-Writer/First-issue-on-my-workstation-while-ru.f_7693/image_thumb.png" width="470" height="225" />
          </a>
        </p>
        <p>
          <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-sadsmile" alt="Sad smile" src="http://lennybacon.com/content/binary/Windows-Live-Writer/First-issue-on-my-workstation-while-ru.f_7693/wlEmoticon-sadsmile_2.png" />
        </p>
        <img width="0" height="0" src="http://lennybacon.com/aggbug.ashx?id=a30b2a48-2aa8-4052-93e5-ba5323296c32" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://devcoach.com">devcoach.com</a>. 
</body>
      <title>First issue on my workstation while running in UTC Timezone: Last.fm</title>
      <guid isPermaLink="false">http://lennybacon.com/PermaLink,guid,a30b2a48-2aa8-4052-93e5-ba5323296c32.aspx</guid>
      <link>http://lennybacon.com/2011/07/05/FirstIssueOnMyWorkstationWhileRunningInUTCTimezoneLastfm.aspx</link>
      <pubDate>Tue, 05 Jul 2011 20:26:36 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://lennybacon.com/content/binary/Windows-Live-Writer/First-issue-on-my-workstation-while-ru.f_7693/image_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lennybacon.com/content/binary/Windows-Live-Writer/First-issue-on-my-workstation-while-ru.f_7693/image_thumb.png" width="470" height="225"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-sadsmile" alt="Sad smile" src="http://lennybacon.com/content/binary/Windows-Live-Writer/First-issue-on-my-workstation-while-ru.f_7693/wlEmoticon-sadsmile_2.png"&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://lennybacon.com/aggbug.ashx?id=a30b2a48-2aa8-4052-93e5-ba5323296c32" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://devcoach.com"&gt;devcoach.com&lt;/a&gt;. </description>
      <comments>http://lennybacon.com/CommentView,guid,a30b2a48-2aa8-4052-93e5-ba5323296c32.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://lennybacon.com/Trackback.aspx?guid=50f8bcf5-3b3b-42fc-8e70-44f5e3608551</trackback:ping>
      <pingback:server>http://lennybacon.com/pingback.aspx</pingback:server>
      <pingback:target>http://lennybacon.com/PermaLink,guid,50f8bcf5-3b3b-42fc-8e70-44f5e3608551.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://lennybacon.com/CommentView,guid,50f8bcf5-3b3b-42fc-8e70-44f5e3608551.aspx</wfw:comment>
      <wfw:commentRss>http://lennybacon.com/SyndicationService.asmx/GetEntryCommentsRss?guid=50f8bcf5-3b3b-42fc-8e70-44f5e3608551</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://lennybacon.com/content/binary/Windows-Live-Writer/4365ef934c47_B516/image_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lennybacon.com/content/binary/Windows-Live-Writer/4365ef934c47_B516/image_thumb.png" width="893" height="193" />
          </a>
        </p>
        <p>
As Visual Studio keeps forgetting the settings that also affect validation and falls
back to the *oh-so-90-style-2.1-css-version* just delete ALL other schemas.
</p>
        <p>
 
</p>
        <p>
Thanks to the *industry known* Sweat Swank for searching the registry key.
</p>
        <img width="0" height="0" src="http://lennybacon.com/aggbug.ashx?id=50f8bcf5-3b3b-42fc-8e70-44f5e3608551" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://devcoach.com">devcoach.com</a>. 
</body>
      <title>CSS 3.0 as the only schema in Visual Studio</title>
      <guid isPermaLink="false">http://lennybacon.com/PermaLink,guid,50f8bcf5-3b3b-42fc-8e70-44f5e3608551.aspx</guid>
      <link>http://lennybacon.com/2011/06/18/CSS30AsTheOnlySchemaInVisualStudio.aspx</link>
      <pubDate>Sat, 18 Jun 2011 10:58:21 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://lennybacon.com/content/binary/Windows-Live-Writer/4365ef934c47_B516/image_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lennybacon.com/content/binary/Windows-Live-Writer/4365ef934c47_B516/image_thumb.png" width="893" height="193"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
As Visual Studio keeps forgetting the settings that also affect validation and falls
back to the *oh-so-90-style-2.1-css-version* just delete ALL other schemas.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Thanks to the *industry known* Sweat Swank for searching the registry key.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://lennybacon.com/aggbug.ashx?id=50f8bcf5-3b3b-42fc-8e70-44f5e3608551" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://devcoach.com"&gt;devcoach.com&lt;/a&gt;. </description>
      <comments>http://lennybacon.com/CommentView,guid,50f8bcf5-3b3b-42fc-8e70-44f5e3608551.aspx</comments>
      <category>ASP.NET</category>
      <category>Projects</category>
      <category>Visual Studio</category>
    </item>
  </channel>
</rss>
