One or more types required to compile a dynamic expression cannot be found. Are you missing references to Microsoft.CSharp.dll and System.Core.dll?
On your solution explorer window, right click to References, select Add Reference, go to .NET tab, find and add Microsoft.CSharp.
Alternatively add the Microsoft.CSharp NuGet package.
Install-Package Microsoft.CSharp
Why am I getting 'One or more types required to compile a dynamic expression cannot be found.'?
Okay I got it working with the following steps.
- In the config file I changed
<compilation debug="true">
to<compilation debug="true" targetFramework="4.0">
in the system.web section - In the config file I changed
<providerOption name="CompilerVersion" value="v3.5" />
to<providerOption name="CompilerVersion" value="v4.0" />
in the compilers section - In Global.asax.cs I added
ViewEngines.Engines.Add(new RazorViewEngine());
to theApplication_Start()
method
and I think that was it.
One or more types required to compile a dynamic expression cannot be found
Dynamic
keyword requires .Net Framework 4.0. (and DLR).
Windows Phone 7 (and 8) has it's own version of .Net Framework. And dynamic language runtime is not included.
So, you can't use it for Windows Phone development.
ViewBag: One or more types required to compile a dynamic expression cannot be found
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.
Excel worksheets error: One or more types required to compile a dynamic expression cannot be found
Try removing the "Microsoft.CSharp" reference then add it back your project.
Related Topics
How Does Deferred Linq Query Execution Actually Work
Generic List of Generic Objects
Why Does My .Net Application Crash When Run from a Network Drive
Download Feature Not Working Within Update Panel in ASP.NET
C# - Check If File Is Text Based
How to Find Duplicates in an Array and Display How Many Times They Occurred
C# - How to Detect a Windows Shutdown/Logoff and Cancel That Action (After Asking the User)
C#: How to Edit Items and Subitems in a Listview
Creating a Circularly Linked List in C#
Any Trick to Use Opacity on a Panel in Visual Studio Window Form
Windows Authentication in ASP.NET 5