Adding workaround to compilation for web host

This commit is contained in:
Pranav K 2014-02-21 08:09:03 -08:00
parent 9d056167e8
commit 906e68e72e
1 changed files with 5 additions and 1 deletions

View File

@ -28,7 +28,11 @@ namespace Microsoft.AspNet.Mvc.Razor
string outFile = Path.Combine(_tempDir, Path.GetRandomFileName() + ".dll");
StringBuilder args = new StringBuilder("/target:library ");
args.AppendFormat("/out:\"{0}\" ", outFile);
foreach (var file in Directory.EnumerateFiles(Directory.GetCurrentDirectory(), "*.dll"))
string binDir = Path.Combine(Directory.GetCurrentDirectory(), "bin");
// In the k-world, CurrentDir happens to be the bin dir
binDir = Directory.Exists(binDir) ? binDir : Directory.GetCurrentDirectory();
foreach (var file in Directory.EnumerateFiles(binDir, "*.dll"))
{
args.AppendFormat("/R:\"{0}\" ", file);
}