Why is System.Web.Mvc not listed in Add References?

后端 未结 14 2616
日久生厌
日久生厌 2020-12-12 23:25

Using C#, Visual Studio 2010.

There is a namespace called System.Web.Mvc documented on MSDN. The documentation for all the types in that namespace says that they are

14条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-12 23:54

    Check these step:

    1. Check MVC is installed properly.
    2. Check the project's property and see what is the project Target Framework. If the target framework is not set to .Net Framework 4, set it.

    Note: if target framework is set to .Net Framework 4 Client Profile, it will not list MVC reference on references list. You can find different between .Net Framework 4 and .Net Framework 4 Client Profile here.

    The .NET Framework 4 Client Profile is a subset of the .NET Framework 4 that is optimized for client applications. It provides functionality for most client applications, including Windows Presentation Foundation (WPF), Windows Forms, Windows Communication Foundation (WCF), and ClickOnce features. This enables faster deployment and a smaller install package for applications that target the .NET Framework 4 Client Profile.

提交回复
热议问题