Adding workaround to compilation for web host
This commit is contained in:
parent
9d056167e8
commit
906e68e72e
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue