<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>Golem.Build/Libs/YAML.NET.dll</filename>
    </added>
    <added>
      <filename>Golem.Core/Configuration.cs</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -49,6 +49,7 @@
   &lt;/ItemGroup&gt;
   &lt;ItemGroup&gt;
     &lt;Content Include=&quot;Docs\Rake Examples.txt&quot; /&gt;
+    &lt;Content Include=&quot;Docs\Welcome.htm&quot; /&gt;
   &lt;/ItemGroup&gt;
   &lt;ItemGroup&gt;
     &lt;Folder Include=&quot;Configs\&quot; /&gt;</diff>
      <filename>Golem.Build/Golem.Build.csproj</filename>
    </modified>
    <modified>
      <diff>@@ -45,6 +45,7 @@
     &lt;Reference Include=&quot;System.Xml&quot; /&gt;
   &lt;/ItemGroup&gt;
   &lt;ItemGroup&gt;
+    &lt;Compile Include=&quot;Configuration.cs&quot; /&gt;
     &lt;Compile Include=&quot;Locations.cs&quot; /&gt;
     &lt;Compile Include=&quot;Recipe.cs&quot; /&gt;
     &lt;Compile Include=&quot;Task.cs&quot; /&gt;</diff>
      <filename>Golem.Core/Golem.Core.csproj</filename>
    </modified>
    <modified>
      <diff>@@ -7,8 +7,7 @@ using System.Linq;
 using Golem.Core;
 
 namespace Golem.Core
-{  
-
+{
     /// &lt;summary&gt;
     /// 
     /// &lt;/summary&gt;
@@ -24,8 +23,11 @@ namespace Golem.Core
 
         public RecipeFinder()
         {
+            this.startDirs = new string[]{Environment.CurrentDirectory};
         }
+        
 
+        
         public RecipeFinder(params string[] startDirs) : this()
         {
             this.startDirs = startDirs;
@@ -41,6 +43,9 @@ namespace Golem.Core
 
         public ReadOnlyCollection&lt;Assembly&gt; AllAssembliesFound { get; private set; }
         public ReadOnlyCollection&lt;Recipe&gt; AllRecipesFound { get; private set; }
+
+        public List&lt;Assembly&gt; AssembliesContainingRecipes { get; private set; }
+        public List&lt;FileInfo&gt; FilesContainingRecipes = new List&lt;FileInfo&gt;();
         
         //TODO: Too many variables
         public IList&lt;Recipe&gt; FindRecipesInFiles()
@@ -60,27 +65,29 @@ namespace Golem.Core
 
                 AllAssembliesFound = loadedAssemblies.AsReadOnly();
                 AllRecipesFound = recipeClasses.AsReadOnly();
-
-
-                
             }
 
             return recipeClasses.AsReadOnly();
         }
 
+        
+        
         private List&lt;Assembly&gt; PreLoadAssembliesToPreventAssemblyNotFoundError(FileInfo[] dllFile)
         {
             var loaded = new List&lt;Assembly&gt;();
             
             foreach (var dll in dllFile)
                 //loading the core twice is BAD because &quot;if(blah is RecipeAttribute)&quot; etc will always fail
-                if(! dll.Name.StartsWith(&quot;Golem.Core&quot;)) 
+                if(! dll.Name.StartsWith(&quot;Golem.Core&quot;) &amp;&amp; ! FilesContainingRecipes.Any(file=&gt;file.FullName == dll.FullName))
+                {
                     loaded.Add(Assembly.LoadFrom(dll.FullName));
+                    FilesContainingRecipes.Add(dll);
+                }
 
             return loaded;
         }
 
-        private static void FindRecipesInAssembly(Assembly loaded, List&lt;Recipe&gt; recipeClasses)
+        private void FindRecipesInAssembly(Assembly loaded, List&lt;Recipe&gt; recipeClasses)
         {
             try
             {
@@ -103,7 +110,7 @@ namespace Golem.Core
         }
 
 
-        public static RecipeAttribute GetRecipeAttributeOrNull(Type type)
+        public RecipeAttribute GetRecipeAttributeOrNull(Type type)
         {
             //get recipe attributes for type 
             var atts = type.GetCustomAttributes(typeof(RecipeAttribute), true);
@@ -116,6 +123,12 @@ namespace Golem.Core
             if (atts.Length == 0)
                 return null;
 
+            if(AssembliesContainingRecipes == null)
+                AssembliesContainingRecipes = new List&lt;Assembly&gt;();
+
+            if (! AssembliesContainingRecipes.Contains(type.Assembly))
+                AssembliesContainingRecipes.Add(type.Assembly);
+
             var recipeAtt = atts[0] as RecipeAttribute;
 
             //throw if bad case. Should cast fine (if not, then might indicate 2 of the same assembly is loaded)
@@ -131,7 +144,7 @@ namespace Golem.Core
         //TODO: Not enough comments
         //TODO: Too many variables
         //
-        private static void FindRecipeInType(Type type, List&lt;Recipe&gt; manifest)
+        private void FindRecipeInType(Type type, List&lt;Recipe&gt; manifest)
         {
             //find the attribute on the assembly if there is one
             var recipeAtt = GetRecipeAttributeOrNull(type);</diff>
      <filename>Golem.Core/RecipeFinder.cs</filename>
    </modified>
    <modified>
      <diff>@@ -43,9 +43,10 @@ namespace Golem.Core
         //TODO: Nesting depth is too deep
         public void Run(string recipeName, string taskName)
         {
-            var found = finder.FindRecipesInFiles();
-            
-            foreach(var r in found)
+            if(finder.AllRecipesFound.Count==0)
+                finder.FindRecipesInFiles();
+
+            foreach (var r in finder.AllRecipesFound)
             {
                 if(r.Name.ToLower() == recipeName.ToLower())
                 {</diff>
      <filename>Golem.Core/TaskRunner.cs</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 &#65279;using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Linq;
 using System.Text;
 using Golem.Core;
@@ -118,4 +119,49 @@ namespace Golem.Test
         }
         
     }
+
+    [TestFixture]
+    public class FinderConfigurationFixture
+    {
+        [SetUp]
+        public void Before_Each_Test()
+        {
+            if(File.Exists(Configuration.DefaultFileName))
+                File.Delete(Configuration.DefaultFileName);
+        }
+
+     
+
+        [Test]
+        public void Finder_Caches_Assemblies_Containing_Recipes()
+        {
+            var finder = new RecipeFinder();
+            finder.FindRecipesInFiles();
+            Assert.AreEqual(1, finder.AssembliesContainingRecipes.Count);
+        }
+
+        [Test]
+        public void Can_Automatically_Generate_First_Config_File()
+        {
+            Assert.IsFalse(File.Exists(&quot;\\&quot; + Configuration.DefaultFileName));
+            var config = new Configuration();
+            Assert.IsTrue(config.IsNew);
+            Assert.IsFalse(File.Exists(&quot;\\&quot; + Configuration.DefaultFileName));
+
+            var finder = new RecipeFinder();
+            finder.FindRecipesInFiles();
+
+            if(config.IsNew)
+                config.RecipeSearchHints.AddRange(finder.FilesContainingRecipes.Select(s=&gt;s.FullName));
+
+            config.Save();
+
+            var config2 = new Configuration();
+            Assert.IsFalse(config2.IsNew);
+            Assert.AreEqual(1, config2.RecipeSearchHints.Count);
+
+            
+        }
+
+    }
 }</diff>
      <filename>Golem.Test/RecipeDiscoveryFixture.cs</filename>
    </modified>
    <modified>
      <diff>@@ -9,11 +9,6 @@ Project(&quot;{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}&quot;) = &quot;Golem.Runner&quot;, &quot;Golem.Runne
 EndProject
 Project(&quot;{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}&quot;) = &quot;Golem.Build&quot;, &quot;Golem.Build\Golem.Build.csproj&quot;, &quot;{9F3F3B09-AB90-42E0-B099-81E8BB505954}&quot;
 EndProject
-Project(&quot;{2150E333-8FDC-42A3-9474-1A3956D46DE8}&quot;) = &quot;Solution Items&quot;, &quot;Solution Items&quot;, &quot;{2CFC9ECF-8ED3-4B98-8C5B-7FA5580F34C3}&quot;
-	ProjectSection(SolutionItems) = preProject
-		Welcome.htm = Welcome.htm
-	EndProjectSection
-EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU</diff>
      <filename>Golem.sln</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>978f2065b9601bb4d85273587a9234c41fe9b7f4</id>
    </parent>
  </parents>
  <author>
    <name>Tobin</name>
    <email>tobin@tobinharris.com</email>
  </author>
  <url>http://github.com/tobinharris/golem/commit/add1d4fa06cd01c2a8ac5e95d72dacc79290e686</url>
  <id>add1d4fa06cd01c2a8ac5e95d72dacc79290e686</id>
  <committed-date>2008-09-21T11:51:06-07:00</committed-date>
  <authored-date>2008-09-21T11:51:06-07:00</authored-date>
  <message>working on cofig</message>
  <tree>da012be9bd00b52e77ece79b91e8ae30e6aef8fb</tree>
  <committer>
    <name>Tobin</name>
    <email>tobin@tobinharris.com</email>
  </committer>
</commit>
