Reputation: 2186
This is what I did:
went to https://www.twilio.com/docs/authy/tutorials/account-verification-csharp-mvc
downloaded the code and built the code using VS2017 community edition. I get the following error in IdentityConfig.cs
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'TwilioRestClient' could not be found (are you missing a using directive or an assembly reference?) AccountVerification.Web C:\Users\admin\Downloads\account-verification-csharp-master\account-verification-csharp-master\AccountVerification.Web\App_Start\IdentityConfig.cs 21 Active
What is the problem?
I changed nothing. Just downloaded and built the code. Shouldn't you guys give a working copy of the code?
Upvotes: 3
Views: 1579
Reputation: 3750
I've managed to get this working by following these steps:
nuget restore
and wait for it to finish.UPDATE - Looking at the code it appears that there's a mix of features from the latest version 5.x and the now deprecated version 4.x, and that's causing compilation errors. Details here.
Search for Twilio and downgrade the version from 5.x to 4.7.2.
a) Or from the Package Manager Console Install-Package Twilio -Version 4.7.2
Note: The solution contains a file named Local.config.example. When you open the solution you'll notice that Local.config file is missing.
Renaming the existing Local.config.example file to Local.config solves that issue. I had to copy the Local.config file to the test project too. This doesn't prevent the solution from building, though.
Hope this helps!
Upvotes: 2