зеркало из https://github.com/aspnet/Mvc.git
Allow MvcRazorHost to run on vanilla .NET45
- Added net45 target and removed specific aspnet50 and aspnetcore50 APIs from that code path.
This commit is contained in:
Родитель
6944fd4bc4
Коммит
29baf80161
|
@ -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
|
||||
/// <summary>
|
||||
/// Initializes a new instance of <see cref="MvcRazorHost"/> with the specified
|
||||
/// <param name="appEnvironment"/>.
|
||||
|
@ -45,6 +49,18 @@ namespace Microsoft.AspNet.Mvc.Razor
|
|||
: this(new PhysicalFileSystem(appEnvironment.ApplicationBasePath))
|
||||
{
|
||||
}
|
||||
#elif NET45
|
||||
/// <summary>
|
||||
/// Initializes a new instance of <see cref="MvcRazorHost"/> with the specified
|
||||
/// <param name="root"/>.
|
||||
/// </summary>
|
||||
/// <param name="root">The path to the application base.</param>
|
||||
public MvcRazorHost(string root) :
|
||||
this(new PhysicalFileSystem(root))
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of <see cref="MvcRazorHost"/> using the specified <paramref name="fileSystem"/>.
|
||||
|
|
|
@ -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-*"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче