From 27574b1616f52e5cd76e9262b2e9e99e0b2bb3c1 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 1 Feb 2014 00:18:33 -0800 Subject: [PATCH] Change the runtime generation so that it runs the app using dynamic compilation. --- build/_k-generate-projects.shade | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/build/_k-generate-projects.shade b/build/_k-generate-projects.shade index 50a25eed3e..836ab15d18 100644 --- a/build/_k-generate-projects.shade +++ b/build/_k-generate-projects.shade @@ -336,13 +336,19 @@ functions Warn("Unable to locate klr.exe under packages"); return ""; } - - string toolsDir = Path.GetDirectoryName(Path.GetDirectoryName(klrPath)); - string outputDll = Path.Combine(projectRoot, "bin", "Debug", configType == "k10" ? "k" : "net45", projectName + ".dll"); + + var toolsDir = Path.GetDirectoryName(Path.GetDirectoryName(klrPath)); + var appHostPath = Path.Combine(toolsDir, + "Microsoft.Net.ApplicationHost", + configType, + "Microsoft.Net.ApplicationHost.dll"); + + var klrSwitches = configType == "k10" ? "--core45" : "--net45"; + var args = klrSwitches + " " + appHostPath + " " + projectRoot + " --nobin"; return String.Format(@"Program {0} - {1}", klrPath, outputDll); + {1}", klrPath, args); } private static string GetProjectKTargets(string packagesDir)