I have this class:
using System;
using System.Web.Mvc;
using System.Data;
using BLL;
namespace LicenseManager.Controllers
{
public class ValidationController : BaseController
{
public ActionResult Default()
{
return View("Default");
}
[HttpPost]
public JsonResult ClearInstallation(FormCollection form)
{
var jr = new JsonResult();
try
{
var licMgr = new BLL.LicManager();
licMgr.ClearInstall(form["regKey"], form["checkKey"]);
}
catch (Exception exc)
{
jr = Json(new { success = "false", error = exc.Message });
}
return jr;
}
}
}
When I try to rebuild or debug I receive the error: The type of namespace name 'BLL' could not be found (are you missing a using directive or an assembly reference?)
I can see that it is referenced:
The intellisense works, and I don't have any errors, until I try to rebuild or compile. I know it exists, and it finds it for intellisense purposes, so why won't it allow me to rebuild or compile?
I have tried:
What else can I try?
UPDATE If you get this error, make sure you read the output. It contained the solution for me.
I had a similar problem when the referenced project was using a different .net framework. Make sure the project you are building and the project you have referenced are using the same framework.
You can verify/change the framework in properties/application/target framework
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With