Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nancy.DynamicDictionary does not contain a definition for X

When running in the VS2015 debugger, just today, never before, in my Routing call, the debugger claims that "Nancy.DynamicDictionary does not contain a definition for v.company_id", which is the variable that I defined in the route as such:

Get["/companies/{company_id}/connection/validate"] = v => Validate( v.company_id );

But when I run from the console all is fine. Running 3 days ago from VS2015 all was fine. Why on earth is this dynamic being treated differently today? This has been working for months now.

UPDATE: I am using VS2015 Community on the machine where this happens. On other machines with standard VS2015 editions, this works flawlessly.

like image 299
Daniel Williams Avatar asked Jan 23 '26 20:01

Daniel Williams


1 Answers

I've noticed this strange, inconsistent behavior before as well. I believe the error goes away if you replace v.company_id with v["company_id"].

like image 121
user2647513 Avatar answered Jan 25 '26 10:01

user2647513