From cbe3185a96c0205227748f104a34b9b8eb98927c Mon Sep 17 00:00:00 2001 From: Peter Blazejewicz Date: Thu, 12 May 2016 22:35:17 +0200 Subject: [PATCH] :arrow_up: Update starter web template for RC2. Closes #2 This brings most recent changes from aspnet/Templates Tested and found breaking on 1.0.0-preview1-002700 --- .../webbasic/Properties/launchSettings.json | 15 +++++++ templates/projects/webbasic/Startup.cs | 6 +-- templates/projects/webbasic/project.json | 40 +++++++++---------- 3 files changed, 34 insertions(+), 27 deletions(-) diff --git a/templates/projects/webbasic/Properties/launchSettings.json b/templates/projects/webbasic/Properties/launchSettings.json index fa450f80..2e84bc97 100644 --- a/templates/projects/webbasic/Properties/launchSettings.json +++ b/templates/projects/webbasic/Properties/launchSettings.json @@ -1,5 +1,20 @@ { + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:24454/", + "sslPort": 0 + } + }, "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, "<%= namespace %>": { "commandName": "Project", "launchBrowser": true, diff --git a/templates/projects/webbasic/Startup.cs b/templates/projects/webbasic/Startup.cs index d521980d..2977229b 100755 --- a/templates/projects/webbasic/Startup.cs +++ b/templates/projects/webbasic/Startup.cs @@ -16,11 +16,7 @@ public Startup(IHostingEnvironment env) { var builder = new ConfigurationBuilder() .SetBasePath(env.ContentRootPath) - .AddJsonFile(source => - { - source.Path = "appsettings.json"; - source.ReloadOnChange = true; - }) + .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true) .AddEnvironmentVariables(); Configuration = builder.Build(); diff --git a/templates/projects/webbasic/project.json b/templates/projects/webbasic/project.json index 98f0f28d..df574a61 100755 --- a/templates/projects/webbasic/project.json +++ b/templates/projects/webbasic/project.json @@ -1,33 +1,33 @@ { "dependencies": { "Microsoft.NETCore.App": { - "version": "1.0.0-rc2-24008", + "version": "1.0.0-rc2-3002611", "type": "platform" }, - "dotnet-razor-tooling": { - "version": "1.0.0-rc2-20581", + "Microsoft.AspNetCore.Diagnostics": "1.0.0-rc2-20801", + "Microsoft.AspNetCore.Mvc": "1.0.0-rc2-20801", + "Microsoft.AspNetCore.Razor.Tools": { + "version": "1.0.0-rc2-20801", "type": "build" }, - "Microsoft.AspNetCore.Diagnostics": "1.0.0-rc2-20581", - "Microsoft.AspNetCore.Mvc": "1.0.0-rc2-20581", - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-20581", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-20581", - "Microsoft.AspNetCore.StaticFiles": "1.0.0-rc2-20581", - "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-20581", - "Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-20581", - "Microsoft.Extensions.Logging": "1.0.0-rc2-20581", - "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-20581", - "Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-20581", - "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc2-20581" + "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-20801", + "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-20801", + "Microsoft.AspNetCore.StaticFiles": "1.0.0-rc2-20801", + "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-20801", + "Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-20801", + "Microsoft.Extensions.Logging": "1.0.0-rc2-20801", + "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-20801", + "Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-20801", + "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc2-20801" }, "tools": { - "dotnet-razor-tooling": { - "version": "1.0.0-rc2-20581", + "Microsoft.AspNetCore.Razor.Tools": { + "version": "1.0.0-rc2-20801", "imports": "portable-net45+win8+dnxcore50" }, "Microsoft.AspNetCore.Server.IISIntegration.Tools": { - "version": "1.0.0-rc2-20581", + "version": "1.0.0-rc2-20801", "imports": "portable-net45+win8+dnxcore50" } }, @@ -42,7 +42,7 @@ } }, - "compilationOptions": { + "buildOptions": { "emitEntryPoint": true, "preserveCompilationContext": true }, @@ -57,10 +57,6 @@ "Views", "appsettings.json", "web.config" - ], - - "exclude": [ - "node_modules" ] },