Skip to content
Permalink
Browse files

Merge pull request #262 from martincostello/AspNet-Core-224

Update to ASP.NET Core 2.2.4
  • Loading branch information...
martincostello committed Apr 14, 2019
2 parents affeab5 + b529516 commit 5cd82850495bcc6040785755c06fee12218a1368
@@ -82,7 +82,7 @@ function DotNetTest {
$openCoverVersion = "4.7.922"
$openCoverPath = Join-Path $nugetPath "OpenCover\$openCoverVersion\tools\OpenCover.Console.exe"

$reportGeneratorVersion = "4.0.15"
$reportGeneratorVersion = "4.1.2"
$reportGeneratorPath = Join-Path $nugetPath "ReportGenerator\$reportGeneratorVersion\tools\netcoreapp2.0\ReportGenerator.dll"

$coverageOutput = Join-Path $OutputPath "code-coverage.xml"
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<AnalyzersVersion>2.6.3</AnalyzersVersion>
<NodaTimeVersion>2.4.4</NodaTimeVersion>
<AnalyzersVersion>2.9.1</AnalyzersVersion>
<NodaTimeVersion>2.4.5</NodaTimeVersion>
<XUnitVersion>2.4.1</XUnitVersion>
</PropertyGroup>
<ItemGroup>
@@ -12,9 +12,8 @@
<PackageReference Include="Microsoft.NetCore.Analyzers" Version="$(AnalyzersVersion)" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-18618-05" PrivateAssets="All" />
<PackageReference Include="OpenCover" Version="4.7.922" PrivateAssets="All" />
<PackageReference Include="ReportGenerator" Version="4.0.15" PrivateAssets="All" />
<PackageReference Include="ReportGenerator" Version="4.1.2" PrivateAssets="All" />
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2" PrivateAssets="All" />
<PackageReference Include="Text.Analyzers" Version="$(AnalyzersVersion)" PrivateAssets="All" />
</ItemGroup>
<PropertyGroup>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "2.2.105"
"version": "2.2.203"
}
}
@@ -28,7 +28,9 @@ public static int Main(string[] args)
CreateWebHostBuilder(args).Build().Run();
return 0;
}
#pragma warning disable CA1031
catch (Exception ex)
#pragma warning restore CA1031
{
Console.Error.WriteLine($"Unhandled exception: {ex}");
return -1;
@@ -84,8 +84,6 @@ public Startup(IConfiguration configuration, IHostingEnvironment hostingEnvironm
app.UseHsts()
.UseHttpsRedirection();

app.UseStaticFiles(CreateStaticFileOptions());

app.UseForwardedHeaders(
new ForwardedHeadersOptions()
{
@@ -94,6 +92,8 @@ public Startup(IConfiguration configuration, IHostingEnvironment hostingEnvironm

app.UseHttpMethodOverride();

app.UseStaticFiles(CreateStaticFileOptions());

app.UseMvcWithDefaultRoute();

app.UseCookiePolicy(CreateCookiePolicy());
@@ -9,7 +9,7 @@
<div class="input-group">
@Html.TextBox("text-guid", @Guid.NewGuid().ToString(), new { @class = "form-control form-control-lg code", id = "text-guid", label = "The generated GUID", @readonly = string.Empty })
<span class="input-group-append">
<button id="copy-guid" class="btn btn-lg btn-secondary copy-button" data-clipboard-target="#text-guid" data-ga-category="tools" data-ga-label="Copy GUID" title="Copy to clipboard">
<button id="copy-guid" class="btn btn-lg btn-secondary copy-button" data-clipboard-target="#text-guid" data-ga-category="tools" data-ga-label="Copy GUID" title="Copy to clipboard" aria-label="Copy GUID to clipboard">
<i class="far fa-clipboard"></i>
</button>
</span>
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<Description>https://martincostello.com/</Description>
@@ -25,7 +25,7 @@
<PackageReference Include="Serilog" Version="2.8.0" />
<PackageReference Include="Serilog.Extensions.Logging" Version="2.0.2" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.0.1" />
<PackageReference Include="Serilog.Sinks.ApplicationInsights" Version="3.0.2" />
<PackageReference Include="Serilog.Sinks.ApplicationInsights" Version="3.0.3" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.UDP" Version="5.0.1" />
<PackageReference Include="WindowsAzure.Storage" Version="9.3.3" />
@@ -137,11 +137,8 @@ protected void WithNavigator(Action<ApplicationNavigator> test, [CallerMemberNam
catch (Exception)
{
TakeScreenshot(navigator.Driver, testName);
throw;
}
finally
{
OutputLogs(navigator.Driver);
throw;
}
}
}
@@ -192,7 +189,9 @@ protected async Task WithNavigatorAsync(Func<ApplicationNavigator, Task> test, [
{
await test(navigator);
}
#pragma warning disable CA1031
catch (Exception)
#pragma warning restore CA1031
{
TakeScreenshot(navigator.Driver, testName);
OutputLogs(navigator.Driver);
@@ -247,7 +246,9 @@ private void OutputLogs(IWebDriver driver)
Output.WriteLine($"[{entry.Timestamp:u}] {logKind} - {entry.Level}: {entry.Message}");
}
}
#pragma warning disable CA1031
catch (Exception ex)
#pragma warning restore CA1031
{
Output.WriteLine($"Failed to output driver logs: {ex.ToString()}");
}
@@ -269,7 +270,9 @@ private void TakeScreenshot(IWebDriver driver, string testName)
screenshot.SaveAsFile(fileName);
}
}
#pragma warning disable CA1031
catch (Exception ex)
#pragma warning restore CA1031
{
Output.WriteLine($"Failed to take screenshot: {ex.ToString()}");
}

0 comments on commit 5cd8285

Please sign in to comment.
You can’t perform that action at this time.