I have an MVC project that has been working for years that I just re-published to the server yesterday. I opened it up to debug and make changes to code. Some time in between compiles, something happened and now the build fails complaining that
The type 'System.Windows.FrameworkElement' is defined in an assembly that is not referenced. You must add a reference to assembly 'PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
and
The type 'System.Windows.DependencyObject' is defined in an assembly that is not referenced. You must add a reference to assembly 'WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
I have looked at similar questions and done as they have suggested to make sure all files are set to the Build Action compile, content or none for the project. I didn't add any new files and I didn't copy paste any images into solution.
Any ideas?
Edit:
Not sure if this will be helpful. I didn't include it because it doesn't seem like it would be, but this is where it takes me when I double click on the errors given.
public PartialViewResult GetByJobID(int jobID)
{
ViewBag.Jobid = jobID;
var getAllHolesByJobID = _toolCalloutService.getAllJobHoles(jobID);
var toolOrderHoleViewModels = //error happens here on var
getAllHolesByJobID.Select(Mapper.Map<HoleInfoViewModel, ToolOrderHoleViewModel>).ToList();
var shipOrigins = _toolCalloutService.GetDistricts();
ViewData["ToolOrderHoleViewModels"] = toolOrderHoleViewModels;
ViewData["ShipOrigins"] = shipOrigins;
ViewData["OrderedBy"] = System.Web.HttpContext.Current.User.Identity.Name.Substring(9);
return PartialView("~/Views/ToolCallout/ToolCallout.cshtml");
}
It just highlights the var
keyword at var toolOrderHoleViewModels
.