edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/context.rb;C549413
File: context.rb
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/context.rb;C549413  (server)    9/3/2008 9:25 AM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/context.rb;config-2
@@ -524,6 +524,10 @@
       contents.gsub! Regexp.new(Regexp.escape("<PostBuildEvent>#{old}</PostBuildEvent>"), Regexp::IGNORECASE), "<PostBuildEvent>#{new}</PostBuildEvent>"
     end
 
+    def replace_app_config_path(contents, old, new)
+      contents.gsub! Regexp.new(Regexp.escape(%Q{<None Include="#{old}" />}), Regexp::IGNORECASE), %Q{<None Include="#{new}" />}
+    end
+
     def transform_project(name, project)
       path = get_target_dir(name) + project
       rake_output_message "Transforming: #{path}"
===================================================================
edit: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Rakefile;C549413
File: Rakefile
===================================================================
--- $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Rakefile;C549413  (server)    9/3/2008 9:21 AM
+++ Shelved Change: $/Dev10/feature/vs_langs01/Merlin/Main/Languages/Ruby/Rakefile;config-2
@@ -96,7 +96,7 @@
     # Special-cased one-way copy of app.config to external layout
 
     if IronRuby.is_merlin?
-      copy get_source_dir(:lang_root) + 'app.config', temp_dir + 'app.config'
+      transform_config_file 'Svn', get_source_dir(:lang_root) + 'app.config', temp_dir + 'app.config'
     end
 
     # Diff and push temp directory files to the target
@@ -205,6 +205,8 @@
 
         replace_post_build_event contents, 'copy $(ProjectDir)..\merlin_ir.exe.config $(TargetDir)ir.exe.config',
                                            'copy $(ProjectDir)..\..\external_ir.exe.config $(TargetDir)ir.exe.config'
+
+        replace_app_config_path contents, '..\..\..\App.config', '..\..\App.config'
       else
         replace_output_path contents, '..\..\build\debug\\', '..\..\..\Bin\Debug\\'
         replace_output_path contents, '..\..\build\release\\', '..\..\..\Bin\Release\\'
@@ -213,9 +215,29 @@
 
         replace_post_build_event contents, 'copy $(ProjectDir)..\..\external_ir.exe.config $(TargetDir)ir.exe.config',
                                            'copy $(ProjectDir)..\merlin_ir.exe.config $(TargetDir)ir.exe.config'
+
+        replace_app_config_path contents, '..\..\App.config', '..\..\..\App.config'
       end
     end
-    transform_project :test_runner, 'ironruby.tests.csproj'
+    transform_project :test_runner, 'ironruby.tests.csproj' do |contents|
+      if IronRuby.is_merlin?
+        replace_output_path contents, '..\..\..\Bin\Debug\\', '..\..\build\debug\\'
+        replace_output_path contents, '..\..\..\Bin\Release\\', '..\..\build\release\\'
+        replace_output_path contents, '..\..\..\Bin\Silverlight Debug\\', '..\..\build\silverlight debug\\'
+        replace_output_path contents, '..\..\..\Bin\Silverlight Release\\', '..\..\build\silverlight release\\'        
+        
+        replace_app_config_path contents, '..\..\..\App.config', '..\..\App.config'
+      else
+        replace_output_path contents, '..\..\build\debug\\', '..\..\..\Bin\Debug\\'
+        replace_output_path contents, '..\..\build\release\\', '..\..\..\Bin\Release\\'
+        replace_output_path contents, '..\..\build\silverlight debug', '..\..\..\Bin\Silverlight Debug\\'
+        replace_output_path contents, '..\..\build\silverlight release', '..\..\..\Bin\Silverlight Release\\'
+        replace_key_path    contents, '..\..\RubyTestKey.snk', '..\..\..\MSSharedLibKey.snk'
+        
+        replace_app_config_path contents, '..\..\App.config', '..\..\..\App.config'
+      end      
+    end
+
     transform_project :scanner, 'ironruby.libraries.scanner.csproj'
   end
 end
@@ -272,8 +294,8 @@
   end
 end
 
-def transform_config(target_path, signed, paths)
-  file = File.new get_source_dir(:lang_root) + 'app.config'
+def transform_config(source_path, target_path, signed, paths)
+  file = File.new source_path
   doc = Document.new file
 
   # disable signing
@@ -302,20 +324,20 @@
   end
 end
 
-def transform_config_file(configuration, target_build_path)
+def transform_config_file(configuration, source_path, target_build_path)
   # signing is on for IronRuby in Merlin, off for SVN and Binary
   layout = {'Merlin' => { :signing => false, :LibraryPaths => '..\..\Languages\Ruby\libs;..\..\..\External\Languages\Ruby\Ruby-1.8.6\lib\ruby\site_ruby\1.8;..\..\..\External\Languages\Ruby\Ruby-1.8.6\lib\ruby\site_ruby;..\..\..\External\Languages\Ruby\Ruby-1.8.6\lib\ruby\1.8' }, 
             'Svn'    => { :signing => false, :LibraryPaths => '..\..\lib\IronRuby;..\..\lib\ruby\site_ruby\1.8;..\..\lib\ruby\site_ruby;..\..\lib\ruby\1.8' },
             'Binary' => { :signing => true,  :LibraryPaths => '..\lib\IronRuby;..\lib\ruby\site_ruby\1.8;..\lib\ruby\site_ruby;..\lib\ruby\1.8' } }
   
-  transform_config target_build_path, layout[configuration][:signing], layout[configuration][:LibraryPaths]
+  transform_config source_path, target_build_path, layout[configuration][:signing], layout[configuration][:LibraryPaths]
 end
 
 desc "compile IronRuby console"
 task :compile_console => [:compile_libraries] do
   IronRuby.source_context do
     compile :console, :references => ['Microsoft.Scripting.Core.dll', 'Microsoft.Scripting.dll', 'IronRuby.dll'], :output => IRONRUBY_COMPILER
-    transform_config_file IronRuby.is_merlin? ? 'Merlin' : 'Svn', "#{build_path}\\ir.exe.config"
+    transform_config_file IronRuby.is_merlin? ? 'Merlin' : 'Svn', get_source_dir(:lang_root) + 'app.config', "#{build_path}\\ir.exe.config"
   end
 end
 
@@ -747,7 +769,7 @@
     system %Q{copy "#{ENV['MERLIN_ROOT']}\\bin\\release\\Microsoft.Scripting.dll" #{PACKAGE_DIR}\\bin\\}
 
     # Generate ir.exe.config
-    transform_config_file 'Binary', "#{PACKAGE_DIR}\\bin\\ir.exe.config"
+    transform_config_file 'Binary', get_source_dir(:lang_root) + 'app.config', "#{PACKAGE_DIR}\\bin\\ir.exe.config"
 
     # Copy standard library
     system %Q{xcopy /E /I "#{ENV['MERLIN_ROOT']}\\..\\External\\Languages\\Ruby\\redist-libs\\ruby" #{PACKAGE_DIR}\\lib\\ruby}
===================================================================
