The System. Web does not contain a type or namespace name "Optimization" (is the Assembly reference missing ?),
When the mvc4 project is running, a prompt is displayed when you browse the page.The namespace "System. Web" does not contain a type or namespace name "Optimization" (is the Assembly reference missing ?)
Later, I found that the problem occurred in the Web. config file configuration in the view folder.
<Pages pageBaseType = "System. web. mvc. webViewPage "> <namespaces> <add namespace =" System. web. mvc "/> <add namespace =" System. web. mvc. ajax "/> <add namespace =" System. web. mvc. html "/> <add namespace =" System. web. optimization "/> <add namespace =" System. web. routing "/> </namespaces> </pages>
Solution:
Just remove <add namespace = "System. Web. Optimization"/>.
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.