Reputation: 11
I have a problem with my sintak controller
on asp.net mvc
,
using Toyota.Common.Web.Platform;
using FAMS.Models;
namespace FAMS.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
public ActionResult About()
{
return View();
}
}
}
And have error:
Error 1 The type or namespace name 'Toyota' could not be found (are you missing a using directive or an assembly reference?) e:\ExampleApplication\ExampleApplication\Views\Shared_Layout.cshtml 1 8 ExampleApplication
Upvotes: 0
Views: 105
Reputation: 6461
Assuming Toyota
reference which is you referred from your own class Library
or dll.
If that project/dll is having any issue. referred project will not load the dll properly in this solution. So you may get an error (as you got).
As per the @Khaltazar
answer you may missed the reference to add. You have referred the NameSpace
as using Toyota.Common.Web.Platform;
in your controller. But add the reference dll
in to your current project references
.
Finally Clean
the solution and Build / ReBuild
.
Stop the process if the referred dll is being process
with any other (It may be Locked
).
Upvotes: 0
Reputation: 296
It's most likely because you are missing a reference to Toyota. Right click on References and add that reference mentioned.
Upvotes: 2