Reputation: 11905
What NuGet package should I be using to access the Twilio API from my ASP.NET Core MVC 5.0 project?
My ASP.NET Core project file targets net5.0. I include the Twilio.AspNet.Mvc
NuGet package (latest version).
When my project builds, I get a bunch of warnings telling me that something is pulling in obsolete versions of Microsoft assemblies.
For example:
Warning NU1701 Package 'Microsoft.AspNet.Mvc 3.0.20105.1' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net5.0'. This package may not be fully compatible with your project.
After a bit of sleuthing, it appears that the problem is because Twilio.AspNet.Mvc
(v5.37.2) pulls in, among other things, Microsoft.AspNet.Mvc
(v3.0.20105.1).
That package has a warning:
Package 'Twilio.AspNet.Mvc 5.37.2' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net5.0'. This package may not be fully compatible with your project.
I tried removing and reinstalling the Twilio package, but that didn't help.
Upvotes: 1
Views: 453
Reputation: 15213
The package documentation says that you should use Twilio.AspNet.Core
.
Upvotes: 3