diff --git a/Nuget.Config b/NuGet.config similarity index 75% rename from Nuget.Config rename to NuGet.config index 47bcb5c..9c2acf5 100644 --- a/Nuget.Config +++ b/NuGet.config @@ -1,7 +1,6 @@ - diff --git a/global.json b/global.json index 9a66d5e..c9ecb07 100644 --- a/global.json +++ b/global.json @@ -1,3 +1,3 @@ { - "projects": [ "src", "test" ] + "projects": [ "src" ] } diff --git a/src/openiddict-test/Program.cs b/src/openiddict-test/Program.cs new file mode 100644 index 0000000..c457b48 --- /dev/null +++ b/src/openiddict-test/Program.cs @@ -0,0 +1,29 @@ +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; + +namespace openiddicttest +{ + public static class Program + { + public static void Main(string[] args) + { + var configuration = new ConfigurationBuilder() + .AddEnvironmentVariables() + .AddCommandLine(args) + .Build(); + + var host = new WebHostBuilder() + .ConfigureLogging(options => options.AddConsole()) + .ConfigureLogging(options => options.AddDebug()) + .UseConfiguration(configuration) + .UseIISIntegration() + .UseKestrel() + .UseStartup() + .Build(); + + host.Run(); + } + } +} diff --git a/src/openiddict-test/Startup.cs b/src/openiddict-test/Startup.cs index 8c0f1b0..f8839b4 100644 --- a/src/openiddict-test/Startup.cs +++ b/src/openiddict-test/Startup.cs @@ -1,9 +1,7 @@ using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; using OpenIddict; using OpenIddict.Models; using openiddicttest.Models; @@ -14,20 +12,6 @@ public class Startup { public IConfigurationRoot Configuration { get; set; } - public static void Main(string[] args) - { - var application = new WebHostBuilder() - .ConfigureLogging(options => options.AddDebug(minLevel: LogLevel.Debug)) - .ConfigureLogging(options => options.AddConsole(minLevel: LogLevel.Debug)) - .UseDefaultHostingConfiguration(args) - .UseIISPlatformHandlerUrl() - .UseKestrel() - .UseStartup() - .Build(); - - application.Run(); - } - public void ConfigureServices(IServiceCollection services) { // add the config file which stores the connection string @@ -57,8 +41,6 @@ public void ConfigureServices(IServiceCollection services) public void Configure(IApplicationBuilder app, IDatabaseInitializer databaseInitializer) { - app.UseIISPlatformHandler(); - app.UseDeveloperExceptionPage(); // to serve up index.html diff --git a/src/openiddict-test/openiddict-test.xproj b/src/openiddict-test/openiddict-test.xproj index f0e2b0d..f43c9b9 100644 --- a/src/openiddict-test/openiddict-test.xproj +++ b/src/openiddict-test/openiddict-test.xproj @@ -4,22 +4,15 @@ 14.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - + f4d55d74-52c4-4575-be4d-9c92b35339b0 openiddict_test - ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin\$(MSBuildProjectName)\ + .\obj + .\bin\ - 2.0 - - - - - - + diff --git a/src/openiddict-test/project.json b/src/openiddict-test/project.json index fb92df0..fbe8c6f 100644 --- a/src/openiddict-test/project.json +++ b/src/openiddict-test/project.json @@ -1,44 +1,53 @@ { - "version": "1.0.0-*", - "compilationOptions": { + "buildOptions": { + "debugType": "portable", "emitEntryPoint": true, - "preserveCompilationContext": true + "warningsAsErrors": true, + "preserveCompilationContext": true, + + "copyToOutput": { + "include": [ + "wwwroot", + "appsettings.json", + "web.config" + ] + } }, "dependencies": { - "Microsoft.EntityFrameworkCore.SqlServer": "1.0.0-*", - "Microsoft.AspNetCore.Authentication.Cookies": "1.0.0-*", - "Microsoft.AspNetCore.Diagnostics": "1.0.0-*", - "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0-*", - "Microsoft.AspNetCore.IISPlatformHandler": "1.0.0-*", - "Microsoft.AspNetCore.Authentication.JwtBearer": "1.0.0-*", - "Microsoft.AspNetCore.Mvc": " 1.0.0-*", - "Microsoft.AspNetCore.Hosting": "1.0.0-*", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*", - "Microsoft.AspNetCore.StaticFiles": "1.0.0-*", - "Microsoft.Extensions.Configuration.Json": "1.0.0-*", - "AspNet.Security.OAuth.Validation": "1.0.0-*", + "Microsoft.EntityFrameworkCore.SqlServer": "1.0.0-rc2-final", + "Microsoft.AspNetCore.Authentication.Cookies": "1.0.0-rc2-final", + "Microsoft.AspNetCore.Diagnostics": "1.0.0-rc2-final", + "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0-rc2-final", + "Microsoft.AspNetCore.Authentication.JwtBearer": "1.0.0-rc2-final", + "Microsoft.AspNetCore.Mvc": "1.0.0-rc2-final", + "Microsoft.AspNetCore.Hosting": "1.0.0-rc2-final", + "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final", + "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final", + "Microsoft.AspNetCore.StaticFiles": "1.0.0-rc2-final", + "Microsoft.Extensions.Configuration.CommandLine": "1.0.0-rc2-final", + "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final", + "Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final", + "AspNet.Security.OAuth.Validation": "1.0.0-alpha1-*", "OpenIddict.Core": "1.0.0-*", "OpenIddict.EF": "1.0.0-*", - "Microsoft.Extensions.Logging.Console": "1.0.0-*", - "Microsoft.Extensions.Logging.Debug": "1.0.0-*" - }, - - "commands": { - "web": "openiddict-test", - "ef": "EntityFrameworkCore.Commands" + "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final", + "Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final" }, "frameworks": { "net451": { - "frameworkAssemblies": { - "System.Runtime": { "type": "build", "version": "4.0.10.0" } + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1-rc2-24027" } }, - "netstandardapp1.5": { + "netcoreapp1.0": { "dependencies": { - "NETStandard.Library": "1.5.0-*" + "Microsoft.NETCore.App": { + "type": "platform", + "version": "1.0.0-rc2-3002702" + } }, "imports": [ @@ -48,13 +57,22 @@ } }, - "exclude": [ - "wwwroot", - "node_modules" - ], - "publishExclude": [ - "**.user", - "**.vspscc" - ] + "tools": { + "Microsoft.AspNetCore.Server.IISIntegration.Tools": { + "version": "1.0.0-preview1-final", + "imports": "portable-net45+wp80+win8+wpa81+dnxcore50" + } + }, + + "scripts": { + "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" + }, + "publishOptions": { + "include": [ + "wwwroot", + "appsettings.json", + "web.config" + ] + } } diff --git a/src/openiddict-test/web.config b/src/openiddict-test/web.config new file mode 100644 index 0000000..e04a039 --- /dev/null +++ b/src/openiddict-test/web.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file