Reputation: 141462
One or more types required to compile a dynamic expression cannot be found. Are you missing a reference?
ViewBag.SomeKey = "Some Value";
Upvotes: 0
Views: 1384
Reputation: 2324
This is because you are missing a reference to Microsoft.CSharp. To add this reference, on your solution explorer window, right click to References, select Add Reference, go to .NET tab, find and add Microsoft.CSharp.
This will solve your problem.
Upvotes: 4
Reputation: 141462
Add a reference to Microsoft.CSharp.
Upvotes: 1