Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump minimum dep to 3.1 #171

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,8 @@
<NoPackageAnalysis>true</NoPackageAnalysis>
<LangVersion>latest</LangVersion>
<CheckEolTargetFramework>false</CheckEolTargetFramework>

<!-- NU* are workaround for Rider bug which means NuGetAuditSuppress doesn't work -->
<NoWarn>SYSLIB0014;NU1901;NU1902;NU1903;NU1904</NoWarn>
</PropertyGroup>

<ItemGroup>
<!-- Ignore 2.1.0 advisories -->
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-2xjx-v99w-gqf3" />
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-3gp9-h8hw-pxpw" />
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-3w5p-jhp5-c29q" />
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-5633-f33j-c6f7" />
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-6px8-22w5-w334" />
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-g5vf-38cp-4px9" />
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-vgwq-hfqc-58wv" />
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-x5qj-9vmx-7g6g" />
<!-- Ignore 2.1.1 advisories -->
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-23cv-jh4v-vffm" />
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-655q-9gvg-q4cm" />
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-cgpw-2gph-2r9g" />
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-f8qx-mjcq-wfgx" />
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-hxrm-9w7p-39cc" />
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-j378-6mmw-hqfr" />
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-prrf-397v-83xh" />
</ItemGroup>

<Import Project="releasenotes.props" />

</Project>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ This adds the package to your _.csproj_ file
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>Tag Helpers for the ASP.NET Core Security Headers middleware for adding Nonces for use with SecurityHeadersMiddleware</Description>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0;</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;</TargetFrameworks>
<NoWarn>$(NoWarn)</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>Middleware for ASP.NET Core to automatically add security headers to requests.</Description>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0;</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;</TargetFrameworks>
<NoWarn>$(NoWarn)</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0;netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Authors>Andrew Lock</Authors>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0;netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
<AssemblyName>NetEscapades.AspNetCore.SecurityHeaders.Test</AssemblyName>
<PackageId>NetEscapades.AspNetCore.SecurityHeaders.Test</PackageId>
<Nullable>enable</Nullable>
Expand All @@ -21,14 +21,6 @@
<PackageReference Include="System.Diagnostics.Process" Version="4.3.0" />
<PackageReference Include="System.Diagnostics.TraceSource" Version="4.3.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.1.1" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="3.0.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="3.1.0" />
Expand Down
7 changes: 1 addition & 6 deletions test/RazorWebSite/RazorWebSite.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0;netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.1.2" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\NetEscapades.AspNetCore.SecurityHeaders.TagHelpers\NetEscapades.AspNetCore.SecurityHeaders.TagHelpers.csproj" />
</ItemGroup>
Expand Down
14 changes: 3 additions & 11 deletions test/RazorWebSite/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ public class Startup
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
#pragma warning disable 618 // Version_2_1 is obsolete
#pragma warning disable ASP5001
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
#pragma warning restore ASP5001
#pragma warning restore 618
services.AddMvc();
}

// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
Expand Down Expand Up @@ -54,11 +50,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
app.UseSecurityHeaders(policyCollection);

app.UseStaticFiles();
#if NETCOREAPP3_0_OR_GREATER
app.UseRouting();
app.UseEndpoints(endpoints => { endpoints.MapRazorPages(); });
#else
app.UseMvc();
#endif
app.UseRouting();
app.UseEndpoints(endpoints => { endpoints.MapRazorPages(); });
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0;netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
<AssemblyName>SecurityHeadersMiddlewareWebSite</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>SecurityHeadersMiddlewareWebSite</PackageId>
Expand All @@ -11,11 +11,4 @@
<ProjectReference Include="..\..\src\NetEscapades.AspNetCore.SecurityHeaders\NetEscapades.AspNetCore.SecurityHeaders.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="2.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="2.1.0" />
</ItemGroup>

</Project>
Loading