Skip to content

Commit 1f155aa

Browse files
committed
Update dependencies and target frameworks
1 parent f02901d commit 1f155aa

File tree

8 files changed

+47
-52
lines changed

8 files changed

+47
-52
lines changed

build.ps1

100644100755
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env pwsh
12
$originalLocation = Get-Location
23

34
function Remove-EntirePath() {

src/Twilio.AspNet.Common/Twilio.AspNet.Common.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<Description>Twilio request classes for handling Twilio webhooks.</Description>
1010
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
1111
<PackageReleaseNotes>Refer to the changelog at https://github.com/twilio-labs/twilio-aspnet/blob/main/CHANGELOG.md</PackageReleaseNotes>
12-
<Copyright>Copyright 2022 (c) Twilio, Inc. All rights reserved.</Copyright>
12+
<Copyright>Copyright 2024 (c) Twilio, Inc. All rights reserved.</Copyright>
1313
<PackageTags>twilio;twiml;sms;voice;telephony;phone;aspnet</PackageTags>
1414
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
1515
<PackageProjectUrl>https://github.com/twilio/twilio-aspnet</PackageProjectUrl>
@@ -30,7 +30,7 @@
3030
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
3131
</ItemGroup>
3232
<ItemGroup>
33-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
33+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
3434
<PrivateAssets>all</PrivateAssets>
3535
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3636
</PackageReference>

src/Twilio.AspNet.Core.UnitTests/Twilio.AspNet.Core.UnitTests.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net7.0</TargetFramework>
3+
<TargetFramework>net9.0</TargetFramework>
44
<IsPackable>false</IsPackable>
55
<Nullable>disable</Nullable>
66
</PropertyGroup>
77
<ItemGroup>
8-
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="7.0.3" />
9-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
10-
<PackageReference Include="Moq" Version="4.16.1" />
11-
<PackageReference Include="xunit" Version="2.4.1" />
12-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
8+
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="8.0.11" />
9+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
10+
<PackageReference Include="Moq" Version="4.20.72" />
11+
<PackageReference Include="xunit" Version="2.9.2" />
12+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
1313
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1414
<PrivateAssets>all</PrivateAssets>
1515
</PackageReference>

src/Twilio.AspNet.Core.UnitTests/ValidateTwilioRequestTests.cs

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,11 @@ public async Task Validate_Request_Successfully(Type type)
5353
{ "From", "+1234567890" },
5454
{ "Body", "Ahoy!" }
5555
});
56-
c.Request.Headers.Add(
57-
"X-Twilio-Signature", ValidationHelper.CalculateSignature(
56+
c.Request.Headers["X-Twilio-Signature"] = ValidationHelper.CalculateSignature(
5857
$"{ValidTwilioOptions.RequestValidation.BaseUrlOverride.TrimEnd('/')}{c.Request.Path}",
5958
ValidTwilioOptions.RequestValidation.AuthToken,
6059
c.Request.Form
61-
)
62-
);
60+
);
6361
});
6462

6563
Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
@@ -87,7 +85,7 @@ public async Task Validate_Request_Forbid(Type type)
8785
{ "From", "+1234567890" },
8886
{ "Body", "Ahoy!" }
8987
});
90-
c.Request.Headers.Add("X-Twilio-Signature", "sldflsjf");
88+
c.Request.Headers["X-Twilio-Signature"] = "sldflsjf";
9189
});
9290

9391
Assert.Equal(StatusCodes.Status403Forbidden, context.Response.StatusCode);
@@ -121,13 +119,12 @@ public async Task Validate_Request_With_ReloadOnChange(Type type)
121119
{ "From", "+1234567890" },
122120
{ "Body", "Ahoy!" }
123121
});
124-
c.Request.Headers.Add(
125-
"X-Twilio-Signature", ValidationHelper.CalculateSignature(
122+
c.Request.Headers["X-Twilio-Signature"] = ValidationHelper.CalculateSignature(
126123
$"{ValidTwilioOptions.RequestValidation.BaseUrlOverride.TrimEnd('/')}{c.Request.Path}",
127124
ValidTwilioOptions.RequestValidation.AuthToken,
128125
c.Request.Form
129126
)
130-
);
127+
;
131128
});
132129

133130
Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
@@ -158,13 +155,12 @@ public async Task Validate_Request_With_ReloadOnChange(Type type)
158155
{ "From", "+1234567890" },
159156
{ "Body", "Ahoy!" }
160157
});
161-
c.Request.Headers.Add(
162-
"X-Twilio-Signature", ValidationHelper.CalculateSignature(
158+
c.Request.Headers["X-Twilio-Signature"] = ValidationHelper.CalculateSignature(
163159
$"{updatedOptions.RequestValidation.BaseUrlOverride.TrimEnd('/')}{c.Request.Path}",
164160
updatedOptions.RequestValidation.AuthToken,
165161
c.Request.Form
166162
)
167-
);
163+
;
168164
});
169165

170166
Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
@@ -190,7 +186,7 @@ public async Task Validate_Request_With_ReloadOnChange(Type type)
190186
c.Request.Host = new HostString("localhost");
191187
c.Request.Method = HttpMethods.Post;
192188
c.Request.Path = "/sms";
193-
c.Request.Headers.Add("X-Twilio-Signature", "sdfsjf");
189+
c.Request.Headers["X-Twilio-Signature"] = "sdfsjf";
194190
});
195191

196192
Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
3+
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
44
<OutputType>Library</OutputType>
55
<Version>0.0.0-alpha</Version>
66
<PackageId>Twilio.AspNet.Core</PackageId>
@@ -9,7 +9,7 @@
99
<Description>Twilio helper library for ASP.NET Core</Description>
1010
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
1111
<PackageReleaseNotes>Refer to the changelog at https://github.com/twilio-labs/twilio-aspnet/blob/main/CHANGELOG.md</PackageReleaseNotes>
12-
<Copyright>Copyright 2022 (c) Twilio, Inc. All rights reserved.</Copyright>
12+
<Copyright>Copyright 2024 (c) Twilio, Inc. All rights reserved.</Copyright>
1313
<PackageTags>twilio;twiml;sms;voice;telephony;phone;aspnet</PackageTags>
1414
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
1515
<PackageProjectUrl>https://github.com/twilio-labs/twilio-aspnet</PackageProjectUrl>
@@ -21,31 +21,27 @@
2121
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2222
<IncludeSymbols>true</IncludeSymbols>
2323
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
24-
<IsNet70Compatible>$([MSBuild]::IsTargetFrameworkCompatible($(TargetFramework), 'net7.0'))</IsNet70Compatible>
2524
</PropertyGroup>
2625
<PropertyGroup Condition="'$(CI)' == 'true'">
2726
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
2827
</PropertyGroup>
2928
<ItemGroup>
30-
<PackageReference Include="Twilio" Version="6.2.4" />
29+
<PackageReference Include="Twilio" Version="7.7.0" />
3130
<PackageReference Include="Twilio.AspNet.Common" Version="0.0.0-alpha" />
32-
31+
3332
<FrameworkReference Include="Microsoft.AspNetCore.App" />
34-
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
35-
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.3" />
36-
37-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
33+
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.1" />
34+
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
35+
36+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
3837
<PrivateAssets>all</PrivateAssets>
3938
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4039
</PackageReference>
41-
40+
4241
<None Include="..\..\icon.png" Pack="true" PackagePath="\" />
4342
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
4443
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
4544
<_Parameter1>Twilio.AspNet.Core.UnitTests</_Parameter1>
4645
</AssemblyAttribute>
4746
</ItemGroup>
48-
<ItemGroup Condition="!$(IsNet70Compatible)">
49-
<Compile Remove="ValidateTwilioRequestFilter.cs" />
50-
</ItemGroup>
5147
</Project>

src/Twilio.AspNet.Mvc.UnitTests/Twilio.AspNet.Mvc.UnitTests.csproj

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,23 @@
2525
</ItemGroup>
2626
<ItemGroup>
2727
<PackageReference Include="Castle.Core" Version="5.1.1" />
28-
<PackageReference Include="Moq" Version="4.18.4" />
29-
<PackageReference Include="Twilio" Version="6.2.4" />
30-
<PackageReference Include="xunit" Version="2.4.2" />
28+
<PackageReference Include="Moq" Version="4.20.72" />
29+
<PackageReference Include="Twilio" Version="7.7.0" />
30+
<PackageReference Include="xunit" Version="2.9.2" />
3131
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
32-
<PackageReference Include="xunit.analyzers" Version="1.1.0" />
33-
<PackageReference Include="xunit.assert" Version="2.4.2" />
34-
<PackageReference Include="xunit.core" Version="2.4.2" />
35-
<PackageReference Include="xunit.extensibility.core" Version="2.4.2" />
36-
<PackageReference Include="xunit.extensibility.execution" Version="2.4.2" />
37-
<PackageReference Include="xunit.runner.console" Version="2.4.2">
32+
<PackageReference Include="xunit.analyzers" Version="1.17.0">
33+
<PrivateAssets>all</PrivateAssets>
34+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
35+
</PackageReference>
36+
<PackageReference Include="xunit.assert" Version="2.9.2" />
37+
<PackageReference Include="xunit.core" Version="2.9.2" />
38+
<PackageReference Include="xunit.extensibility.core" Version="2.9.2" />
39+
<PackageReference Include="xunit.extensibility.execution" Version="2.9.2" />
40+
<PackageReference Include="xunit.runner.console" Version="2.9.2">
3841
<PrivateAssets>all</PrivateAssets>
3942
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4043
</PackageReference>
41-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
44+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
4245
<PrivateAssets>all</PrivateAssets>
4346
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4447
</PackageReference>

src/Twilio.AspNet.Mvc/Twilio.AspNet.Mvc.csproj

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<Description>Twilio helper library for ASP.NET MVC on .NET Framework.</Description>
1111
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
1212
<PackageReleaseNotes>Refer to the changelog at https://github.com/twilio-labs/twilio-aspnet/blob/main/CHANGELOG.md</PackageReleaseNotes>
13-
<Copyright>Copyright 2022 (c) Twilio, Inc. All rights reserved.</Copyright>
13+
<Copyright>Copyright 2024 (c) Twilio, Inc. All rights reserved.</Copyright>
1414
<PackageTags>twilio;twiml;sms;voice;telephony;phone;aspnet</PackageTags>
1515
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
1616
<PackageProjectUrl>https://github.com/twilio-labs/twilio-aspnet</PackageProjectUrl>
@@ -29,9 +29,7 @@
2929
<ItemGroup>
3030
<Reference Include="System" />
3131
<Reference Include="System.ComponentModel.Composition" />
32-
<Reference Include="System.Configuration">
33-
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1\System.Configuration.dll</HintPath>
34-
</Reference>
32+
<Reference Include="System.Configuration" />
3533
<Reference Include="System.Core" />
3634
<Reference Include="System.IO.Compression" />
3735
<Reference Include="System.Net" />
@@ -49,14 +47,14 @@
4947
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
5048
</ItemGroup>
5149
<ItemGroup>
52-
<PackageReference Include="Twilio" Version="6.2.4" />
50+
<PackageReference Include="Twilio" Version="7.7.0" />
5351
<PackageReference Include="Twilio.AspNet.Common" Version="0.0.0-alpha" />
54-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
52+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
5553
<PrivateAssets>all</PrivateAssets>
5654
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
5755
</PackageReference>
58-
<PackageReference Include="Microsoft.AspNet.Mvc" Version="5.2.9" />
59-
<PackageReference Include="NuGet.Build.Tasks.Pack" Version="6.5.0">
56+
<PackageReference Include="Microsoft.AspNet.Mvc" Version="5.3.0" />
57+
<PackageReference Include="NuGet.Build.Tasks.Pack" Version="6.12.1">
6058
<PrivateAssets>all</PrivateAssets>
6159
</PackageReference>
6260
</ItemGroup>

version_bump.ps1

100644100755
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
#!/usr/bin/env pwsh
12
function updateStandardCsproj() {
23
Param($inputFileNameRelative, $targetVersion)
3-
4+
45
Write-Host "Updating : $inputFileNameRelative"
56

67
$inputFileName = Join-Path $PSScriptRoot $inputFileNameRelative

0 commit comments

Comments
 (0)