diff --git a/src/Microsoft.AspNet.Mvc.Razor.Host/MvcRazorHost.cs b/src/Microsoft.AspNet.Mvc.Razor.Host/MvcRazorHost.cs index 6f3b436ea4..b1a4f7476a 100644 --- a/src/Microsoft.AspNet.Mvc.Razor.Host/MvcRazorHost.cs +++ b/src/Microsoft.AspNet.Mvc.Razor.Host/MvcRazorHost.cs @@ -9,7 +9,10 @@ using Microsoft.AspNet.Razor; using Microsoft.AspNet.Razor.Generator; using Microsoft.AspNet.Razor.Generator.Compiler; using Microsoft.AspNet.Razor.Parser; + +#if ASPNET50 || ASPNETCORE50 using Microsoft.Framework.Runtime; +#endif namespace Microsoft.AspNet.Mvc.Razor { @@ -36,6 +39,7 @@ namespace Microsoft.AspNet.Mvc.Razor // This field holds the type name without the generic decoration (MyBaseType) private readonly string _baseType; +#if ASPNET50 || ASPNETCORE50 /// /// Initializes a new instance of with the specified /// . @@ -45,6 +49,18 @@ namespace Microsoft.AspNet.Mvc.Razor : this(new PhysicalFileSystem(appEnvironment.ApplicationBasePath)) { } +#elif NET45 + /// + /// Initializes a new instance of with the specified + /// . + /// + /// The path to the application base. + public MvcRazorHost(string root) : + this(new PhysicalFileSystem(root)) + { + + } +#endif /// /// Initializes a new instance of using the specified . diff --git a/src/Microsoft.AspNet.Mvc.Razor.Host/project.json b/src/Microsoft.AspNet.Mvc.Razor.Host/project.json index 376323a86f..a0b78cd2c4 100644 --- a/src/Microsoft.AspNet.Mvc.Razor.Host/project.json +++ b/src/Microsoft.AspNet.Mvc.Razor.Host/project.json @@ -6,11 +6,10 @@ "dependencies": { "Microsoft.AspNet.FileSystems": "1.0.0-*", "Microsoft.AspNet.Mvc.Common": "", - "Microsoft.AspNet.Razor": "4.0.0-*", - "Microsoft.Framework.Runtime.Interfaces": "1.0.0-*" + "Microsoft.AspNet.Razor": "4.0.0-*" }, "frameworks": { - "aspnet50": { + "net45": { "dependencies": { "System.Collections": "", "System.Runtime": "", @@ -18,6 +17,15 @@ "System.Xml.Linq": "" } }, + "aspnet50": { + "dependencies": { + "System.Collections": "", + "System.Runtime": "", + "System.Xml": "", + "System.Xml.Linq": "", + "Microsoft.Framework.Runtime.Interfaces": "1.0.0-*" + } + }, "aspnetcore50": { "dependencies": { "System.Collections": "4.0.10.0", @@ -36,7 +44,8 @@ "System.Runtime": "4.0.20.0", "System.Runtime.Extensions": "4.0.10.0", "System.Runtime.InteropServices": "4.0.20.0", - "System.Threading.Tasks": "4.0.10.0" + "System.Threading.Tasks": "4.0.10.0", + "Microsoft.Framework.Runtime.Interfaces": "1.0.0-*" } } }