Permalink
Browse files

Merge pull request #228 from martincostello/AspNet-Core-2.2.0

ASP.NET Core 2.2.0
  • Loading branch information...
martincostello committed Dec 4, 2018
2 parents 4e74139 + 65e4e97 commit 3e3f4464b71bdbb4eb57036c024931c6203feb46
@@ -6,7 +6,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceRoot}/src/Website/bin/Debug/netcoreapp2.1/Website.dll",
"program": "${workspaceRoot}/src/Website/bin/Debug/netcoreapp2.2/Website.dll",
"args": [],
"cwd": "${workspaceRoot}/src/Website",
"stopAtEntry": false,
@@ -18,7 +18,7 @@
</ItemGroup>
<PropertyGroup>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<Authors>Martin Costello</Authors>
<Authors>martin_costello</Authors>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Website.ruleset</CodeAnalysisRuleSet>
<Company>https://github.com/martincostello/website</Company>
<Copyright>Martin Costello (c) 2016-$([System.DateTime]::Now.ToString(yyyy))</Copyright>
@@ -42,7 +42,7 @@
<RepositoryUrl>$(PackageProjectUrl).git</RepositoryUrl>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<TypeScriptToolsVersion>latest</TypeScriptToolsVersion>
<VersionPrefix>2.1.0</VersionPrefix>
<VersionPrefix>2.2.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
<PropertyGroup Condition=" '$(CI)' != '' or '$(TF_BUILD)' != '' ">
@@ -1,5 +1,5 @@
os: Visual Studio 2017
version: 2.1.{build}
version: 2.2.{build}
environment:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "2.1.500"
"version": "2.2.100"
}
}
@@ -38,7 +38,6 @@ public static int Main(string[] args)
private static IWebHostBuilder CreateWebHostBuilder(string[] args)
{
return WebHost.CreateDefaultBuilder(args)
.UseKestrel((p) => p.AddServerHeader = false)
.UseAzureAppServices()
.UseApplicationInsights()
.ConfigureAppConfiguration((context, builder) => builder.AddApplicationInsightsSettings(developerMode: context.HostingEnvironment.IsDevelopment()))
@@ -1,32 +1,34 @@
{
"iisSettings": {
"anonymousAuthentication": true,
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:53485/",
"sslPort": 44309
"applicationUrl": "http://localhost:53892/",
"sslPort": 44366
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "https://localhost:44309/",
"launchUrl": "https://localhost:44366/",
"ancmHostingModel": "InProcess",
"environmentVariables": {
"Azure:Datacenter": "Local",
"ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_HTTPS_PORT": "44309"
"ASPNETCORE_HTTPS_PORT": "44366"
}
},
"Kestrel": {
"Website": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "https://localhost:5001/",
"environmentVariables": {
"Azure:Datacenter": "Local",
"ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_HTTPS_PORT": "5001"
}
},
"applicationUrl": "http://localhost:5000/"
}
}
}
@@ -128,6 +128,7 @@ public void ConfigureServices(IServiceCollection services)
.AddMemoryCache()
.AddDistributedMemoryCache()
.AddMvc(ConfigureMvc)
.SetCompatibilityVersion(CompatibilityVersion.Version_2_2)
.AddJsonOptions((p) => services.AddSingleton(ConfigureJsonFormatter(p)));
services.AddRouting(
@@ -10,8 +10,10 @@ namespace MartinCostello.Website.TagHelpers
using System.Text.Encodings.Web;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc.Razor.Infrastructure;
using Microsoft.AspNetCore.Mvc.Routing;
using Microsoft.AspNetCore.Mvc.TagHelpers;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.FileProviders;
@@ -44,8 +46,8 @@ public class InlineStyleTagHelper : LinkTagHelper
/// </summary>
private static readonly char[] Tilde = new[] { '~' };
public InlineStyleTagHelper(IHostingEnvironment hostingEnvironment, IMemoryCache cache, HtmlEncoder htmlEncoder, JavaScriptEncoder javaScriptEncoder, IUrlHelperFactory urlHelperFactory)
: base(hostingEnvironment, cache, htmlEncoder, javaScriptEncoder, urlHelperFactory)
public InlineStyleTagHelper(IHostingEnvironment hostingEnvironment, TagHelperMemoryCacheProvider cacheProvider, IFileVersionProvider fileVersionProvider, HtmlEncoder htmlEncoder, JavaScriptEncoder javaScriptEncoder, IUrlHelperFactory urlHelperFactory)
: base(hostingEnvironment, cacheProvider, fileVersionProvider, htmlEncoder, javaScriptEncoder, urlHelperFactory)
{
}
@@ -5,10 +5,11 @@ namespace MartinCostello.Website.TagHelpers
{
using System.Text.Encodings.Web;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc.Razor.Infrastructure;
using Microsoft.AspNetCore.Mvc.Routing;
using Microsoft.AspNetCore.Mvc.TagHelpers;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.Extensions.Caching.Memory;
/// <summary>
/// A <see cref="ITagHelper"/> implementation targeting &lt;lazyimg&gt;
@@ -32,19 +33,8 @@ public class LazyImageTagHelper : ImageTagHelper
/// </summary>
private const string SourceAttributeName = "src";
/// <summary>
/// Creates a new <see cref="LazyImageTagHelper"/>.
/// </summary>
/// <param name="hostingEnvironment">The <see cref="IHostingEnvironment"/>.</param>
/// <param name="cache">The <see cref="IMemoryCache"/>.</param>
/// <param name="htmlEncoder">The <see cref="HtmlEncoder"/> to use.</param>
/// <param name="urlHelperFactory">The <see cref="IUrlHelperFactory"/>.</param>
public LazyImageTagHelper(
IHostingEnvironment hostingEnvironment,
IMemoryCache cache,
HtmlEncoder htmlEncoder,
IUrlHelperFactory urlHelperFactory)
: base(hostingEnvironment, cache, htmlEncoder, urlHelperFactory)
public LazyImageTagHelper(IHostingEnvironment hostingEnvironment, TagHelperMemoryCacheProvider cacheProvider, IFileVersionProvider fileVersionProvider, HtmlEncoder htmlEncoder, IUrlHelperFactory urlHelperFactory)
: base(hostingEnvironment, cacheProvider, fileVersionProvider, htmlEncoder, urlHelperFactory)
{
}
@@ -1,12 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<!--
<AspNetCoreHostingModel>inprocess</AspNetCoreHostingModel>
-->
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
<AspNetCoreModuleName>AspNetCoreModule</AspNetCoreModuleName>
<DebugType>full</DebugType>
<Description>https://martincostello.com/</Description>
<OutputType>Exe</OutputType>
<PreserveCompilationContext>true</PreserveCompilationContext>
<RootNamespace>MartinCostello.Website</RootNamespace>
<Summary>Martin Costello's website</Summary>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TypeScriptToolsVersion>latest</TypeScriptToolsVersion>
<UserSecretsId>martincostello.com</UserSecretsId>
</PropertyGroup>
@@ -18,22 +23,20 @@
<Content Update="appsettings.json" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.8.1" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.5.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.8.1" />
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.6" />
<PackageReference Include="Microsoft.AspNetCore.ApplicationInsights.HostingStartup" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.AzureAppServicesIntegration" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.1.1" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.ApplicationInsights.HostingStartup" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.AzureAppServicesIntegration" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.2.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="NodaTime" Version="$(NodaTimeVersion)" />
<PackageReference Include="Serilog" Version="2.7.1" />
<PackageReference Include="Serilog.Extensions.Logging" Version="2.0.2" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.0.1" />
<PackageReference Include="Serilog.Sinks.ApplicationInsights" Version="2.6.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.UDP" Version="5.0.0" />
<PackageReference Include="WindowsAzure.Storage" Version="9.3.2" />
<PackageReference Include="WindowsAzure.Storage" Version="9.3.3" />
</ItemGroup>
<Target Name="BundleAssets" BeforeTargets="PrepareForPublish">
<Exec Command="npm ci" Condition=" '$(InstallWebPackages)' == 'true' " />
@@ -1,7 +1,7 @@
{
"name": "martincostellocom",
"private": true,
"version": "2.1.0",
"version": "2.2.0",
"devDependencies": {
"@types/clipboard": "2.0.1",
"@types/google.analytics": "0.0.39",
@@ -1,9 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<httpErrors errorMode="Custom">
<remove statusCode="400" />
<remove statusCode="404" />
@@ -31,6 +28,6 @@
</rules>
</rewrite>
<urlCompression doDynamicCompression="true" doStaticCompression="true" />
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" disableStartUpErrorPage="true" />
<aspNetCore disableStartUpErrorPage="true" />
</system.webServer>
</configuration>
@@ -5,7 +5,7 @@
<PreserveCompilationContext>true</PreserveCompilationContext>
<RootNamespace>MartinCostello.Website</RootNamespace>
<Summary>Tests for Martin Costello's website</Summary>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Content Include="testsettings.json;xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
@@ -16,7 +16,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="MartinCostello.Logging.XUnit" Version="0.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="2.1.3" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="2.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="NodaTime.Testing" Version="$(NodaTimeVersion)" />
<PackageReference Include="Selenium.Support" Version="3.141.0" />

0 comments on commit 3e3f446

Please sign in to comment.