Added first core clr enabled sample.
This commit is contained in:
parent
125ca080b5
commit
5ea11e396d
|
|
@ -2,11 +2,16 @@
|
|||
|
||||
namespace MvcSample.Web
|
||||
{
|
||||
public class HomeController
|
||||
public class HomeController : Controller
|
||||
{
|
||||
public string Index()
|
||||
{
|
||||
return "Hello World from MVC. Change the controller and save without rebuilding!!";
|
||||
return "Hello from the new MVC";
|
||||
}
|
||||
|
||||
public IActionResult Test()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using Microsoft.AspNet.Abstractions;
|
||||
using Microsoft.AspNet.DependencyInjection;
|
||||
using Microsoft.AspNet.Mvc.Routing;
|
||||
|
|
@ -13,7 +14,11 @@ namespace MvcSample.Web
|
|||
{
|
||||
public void Configuration(IBuilder app)
|
||||
{
|
||||
string appRoot = AppDomain.CurrentDomain.SetupInformation.ApplicationBase;
|
||||
#if NET45
|
||||
var appRoot = AppDomain.CurrentDomain.SetupInformation.ApplicationBase;
|
||||
#else
|
||||
var appRoot = (string)typeof(AppDomain).GetRuntimeMethod("GetData", new[] { typeof(string) }).Invoke(AppDomain.CurrentDomain, new object[] { "APPBASE" });
|
||||
#endif
|
||||
|
||||
var mvcServices = new MvcServices(appRoot);
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
Hello From Razor
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
|
||||
<appSettings>
|
||||
<add key="K" value="true" />
|
||||
</appSettings>
|
||||
<system.web>
|
||||
<compilation debug="true" targetFramework="4.5" />
|
||||
<httpRuntime targetFramework="4.5" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue