diff --git a/samples/Mvc.Client/Startup.cs b/samples/Mvc.Client/Startup.cs index 9562d51a..dd1ffaa5 100644 --- a/samples/Mvc.Client/Startup.cs +++ b/samples/Mvc.Client/Startup.cs @@ -1,6 +1,7 @@ using Microsoft.AspNet.Authentication; using Microsoft.AspNet.Authentication.Cookies; using Microsoft.AspNet.Builder; +using Microsoft.AspNet.Hosting; using Microsoft.AspNet.Http; using Microsoft.AspNet.HttpOverrides; using Microsoft.Extensions.DependencyInjection; @@ -9,6 +10,15 @@ using Microsoft.IdentityModel.Protocols.OpenIdConnect; namespace Mvc.Client { public class Startup { + public static void Main(string[] args) { + var application = new WebApplicationBuilder() + .UseConfiguration(WebApplicationConfiguration.GetDefault(args)) + .UseStartup() + .Build(); + + application.Run(); + } + public void ConfigureServices(IServiceCollection services) { services.Configure(options => { options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme; diff --git a/samples/Mvc.Client/hosting.json b/samples/Mvc.Client/hosting.json new file mode 100644 index 00000000..f159d42d --- /dev/null +++ b/samples/Mvc.Client/hosting.json @@ -0,0 +1,3 @@ +{ + "server": "Microsoft.AspNet.Server.Kestrel" +} \ No newline at end of file diff --git a/samples/Mvc.Client/project.json b/samples/Mvc.Client/project.json index cdf5a48c..ebf9a4ba 100644 --- a/samples/Mvc.Client/project.json +++ b/samples/Mvc.Client/project.json @@ -7,6 +7,7 @@ "Microsoft.AspNet.Authentication.OpenIdConnect": "1.0.0-*", "Microsoft.AspNet.IISPlatformHandler": "1.0.0-*", "Microsoft.AspNet.HttpOverrides": "1.0.0-*", + "Microsoft.AspNet.Hosting": "1.0.0-*", "Microsoft.AspNet.Server.Kestrel": "1.0.0-*", "Microsoft.AspNet.StaticFiles": "1.0.0-*", @@ -16,8 +17,12 @@ "Newtonsoft.Json": "7.0.1" }, + "compilationOptions": { + "emitEntryPoint": true + }, + "commands": { - "web": "Microsoft.AspNet.Server.Kestrel" + "web": "Mvc.Client" }, "frameworks": { diff --git a/samples/Mvc.Server/Startup.cs b/samples/Mvc.Server/Startup.cs index 013740c0..6fe79697 100644 --- a/samples/Mvc.Server/Startup.cs +++ b/samples/Mvc.Server/Startup.cs @@ -1,6 +1,7 @@ using System.Linq; using CryptoHelper; using Microsoft.AspNet.Builder; +using Microsoft.AspNet.Hosting; using Microsoft.AspNet.HttpOverrides; using Microsoft.AspNet.Identity.EntityFramework; using Microsoft.Data.Entity; @@ -14,6 +15,15 @@ using OpenIddict.Models; namespace Mvc.Server { public class Startup { + public static void Main(string[] args) { + var application = new WebApplicationBuilder() + .UseConfiguration(WebApplicationConfiguration.GetDefault(args)) + .UseStartup() + .Build(); + + application.Run(); + } + public void ConfigureServices(IServiceCollection services) { var configuration = new ConfigurationBuilder() .AddJsonFile("config.json") diff --git a/samples/Mvc.Server/hosting.json b/samples/Mvc.Server/hosting.json new file mode 100644 index 00000000..f159d42d --- /dev/null +++ b/samples/Mvc.Server/hosting.json @@ -0,0 +1,3 @@ +{ + "server": "Microsoft.AspNet.Server.Kestrel" +} \ No newline at end of file diff --git a/samples/Mvc.Server/project.json b/samples/Mvc.Server/project.json index 8e7b13b7..a086c63b 100644 --- a/samples/Mvc.Server/project.json +++ b/samples/Mvc.Server/project.json @@ -22,8 +22,12 @@ "OpenIddict": "1.0.0-*" }, + "compilationOptions": { + "emitEntryPoint": true + }, + "commands": { - "web": "Microsoft.AspNet.Server.Kestrel" + "web": "Mvc.Server" }, "frameworks": {