जब मैं एएसपीनेट एमवीसी 3 में प्रोजेक्ट बनाने का प्रयास करता हूं। प्रदर्शित होने के 27 त्रुटियों, कह रही है कि MVC संबंधित वर्गों न मौजूद हैं:त्रुटि टाइप या नेमस्पेस नाम 'नियंत्रक' नहीं मिला (क्या आप एक निर्देश या निर्देशक संदर्भ का उपयोग कर रहे हैं?)
Error 1 The type or namespace name 'Controller' could not be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\hhhhhhhh\my documents\visual studio 2010\Projects\MvcApplication1\MvcApplication1\Controllers\HomeController.cs 10 35 MvcApplication1
अद्यतन
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace MvcApplication2.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
ViewBag.Message = "Welcome to ASP.NET MVC!";
return View();
}
public ActionResult About()
{
return View();
}
}
}
त्रुटियाँ::
Error 1 The type or namespace name 'Controller' could not be found (are you missing a using directive or an assembly reference?) c:\documents and settings\hhhhhhhh\my documents\visual studio 2010\Projects\MvcApplication2\MvcApplication2\Controllers\HomeController.cs 9 35 MvcApplication2
Error 2 The type or namespace name 'ActionResult' could not be found (are you missing a using directive or an assembly reference?) c:\documents and settings\hhhhhhhh\my documents\visual studio 2010\Projects\MvcApplication2\MvcApplication2\Controllers\HomeController.cs 11 16 MvcApplication2
Error 3 The name 'ViewBag' does not exist in the current context c:\documents and settings\hhhhhhhh\my documents\visual studio 2010\Projects\MvcApplication2\MvcApplication2\Controllers\HomeController.cs 13 13 MvcApplication2
Error 4 The name 'View' does not exist in the current context c:\documents and settings\hhhhhhhh\my documents\visual studio 2010\Projects\MvcApplication2\MvcApplication2\Controllers\HomeController.cs 15 20 MvcApplication2
Error 5 The type or namespace name 'ActionResult' could not be found (are you missing a using directive or an assembly reference?) c:\documents and settings\hhhhhhhh\my documents\visual studio 2010\Projects\MvcApplication2\MvcApplication2\Controllers\HomeController.cs 18 16 MvcApplication2
Error 6 The name 'View' does not exist in the current context c:\documents and settings\hhhhhhhh\my documents\visual studio 2010\Projects\MvcApplication2\MvcApplication2\Controllers\HomeController.cs 20 20 MvcApplication2
कृपया सुनिश्चित करें कि आप System.Web.MVC और System.Web.Mvc.Controller या नहीं शामिल गलती से MVC नाम स्थान – Devjosh
के लिए खंड का उपयोग कर रहा does not है कि मामले में तेह नियंत्रक –
पहचान did..it हटाया कृपया इस लिंक को देखने के यह http://stackoverflow.com/questions/6238295/the-type-or-namespace-name-servicecontroller-could-not-be-found @dmitry – Devjosh