Skip to content

Commit

Permalink
4271: Use only .Net 3.1 (no references to packages that require .Net 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgriff committed Feb 14, 2023
1 parent 63e8be3 commit 9aebc0b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 17 deletions.
5 changes: 2 additions & 3 deletions GenderPayGap.Core/Extensions/Lists.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
using System.Data;
using System.Linq;
using System.Net;
using System.Xml.Serialization;
using Microsoft.AspNetCore.WebUtilities;
using System.Web;
using Microsoft.Extensions.Primitives;
using Newtonsoft.Json.Linq;

Expand Down Expand Up @@ -113,7 +112,7 @@ public static string ToQueryString(this NameValueCollection collection, bool all

public static NameValueCollection FromQueryString(this string querystring)
{
return string.IsNullOrWhiteSpace(querystring) ? null : QueryHelpers.ParseNullableQuery(querystring).ToNameValueCollection();
return string.IsNullOrWhiteSpace(querystring) ? null : HttpUtility.ParseQueryString(querystring);
}

public static NameValueCollection ToNameValueCollection(this Dictionary<string, StringValues> dictionary)
Expand Down
1 change: 0 additions & 1 deletion GenderPayGap.Core/GenderPayGap.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

<PackageReference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="3.1.6" />

<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="3.1.6" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="3.1.6" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="3.1.6" />
Expand Down
12 changes: 0 additions & 12 deletions GenderPayGap.WebUI/GenderPayGap.WebUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,6 @@
</None>
</ItemGroup>

<!-- *** THIS IS REQUIRED TO TRANSFORM Web.Config on publish *** -->
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.DotNet.Xdt.Tools" Version="2.0.0" />
</ItemGroup>
<Target Name="ApplyXdtConfigTransform" BeforeTargets="_TransformWebConfig">
<PropertyGroup>
<_SourceWebConfig>$(MSBuildThisFileDirectory)Web.config</_SourceWebConfig>
<_XdtTransform>$(MSBuildThisFileDirectory)Web.$(Configuration).config</_XdtTransform>
<_TargetWebConfig>$(PublishDir)Web.config</_TargetWebConfig>
</PropertyGroup>
<Exec Command="dotnet transform-xdt --xml &quot;$(_SourceWebConfig)&quot; --transform &quot;$(_XdtTransform)&quot; --output &quot;$(_TargetWebConfig)&quot;" Condition="Exists('$(_XdtTransform)')" />
</Target>
<ItemGroup>
<UpToDateCheckInput Remove="Views\Organisation\ManageOrganisationBreadcrumbs.cshtml" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion GenderPayGap.WebUI/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<!-- for more info see https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/aspnet-core-module?view=aspnetcore-2.1#attributes-of-the-aspnetcore-element -->
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="true" stdoutLogFile="%home%\LogFiles\Web" requestTimeout="00:03:40">
<aspNetCore processPath="dotnet" arguments="GenderPayGap.WebUI.dll" stdoutLogEnabled="true" stdoutLogFile="%home%\LogFiles\Web" requestTimeout="00:03:40">
<!-- requestTimeout="00:02:00" is default and "00:03:50" is maximum timout imposed on Azure Load Balancer -->
<!-- https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/azure-apps/troubleshoot?view=aspnetcore-2.2 -->
<environmentVariables />
Expand Down
7 changes: 7 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"sdk": {
"version": "3.1.0",
"rollForward": "latestMajor",
"allowPrerelease": true
}
}

0 comments on commit 9aebc0b

Please sign in to comment.