Base solution for your next web application
Open Closed

Reference error - Help #1913


User avatar
0
exlnt created

Severity Code Description Project File Line Suppression State Error CS0012 The type 'AbpWebViewPage<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'Abp.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. MyProject.Web MyProject.Web\Areas\Mpa\Views\Company\Index.cshtml 1 Active

I am getting error, after I created the view for new page. I am following the step-by-step document for MPA. I copied the code from the docs and modified to fit my entity and classes. I can see that the Abp.Web.Mvc is part of the references of the project. Why is this error coming up and how do I resolve it? I am getting this exact same error on the Acme.PhoneBook solution as well.

Thanks!


4 Answer(s)
  • User Avatar
    0
    exlnt created

    I am now running into yet another error. I develop on two separate PCs, a laptop and desktop. I was building on my laptop last night and checked in my work. Then today I am working on my desktop and now when i run the solution, I get clean build but app does not start and the error below is displayed. Its looking for something with my laptops name in it? I cannot get the app to work on either machine right now, desktop or laptop. Please help!

    <span style="color:#FF0000">Could not load file or assembly 'MyProject.Application-HPEnvyLaptop' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)</span>

  • User Avatar
    0
    exlnt created

    Ok, I was able to resolve the second error. There were DLLs created with my laptop name in the name: MyProject.Application-HPEnvyLaptop.dll. These were sitting in the Bin\DEBUG folder. I deleted ALL of these and the error went away.

    Question: How is my machine name getting appended, I did not change anything in the properties of the project or solution. Is there a way I can stop this from happening?

    Thanks!

  • User Avatar
    0
    ismcagdas created
    Support Team

    Can you check that all ABP dll versions are same in your solution ?

    I didn't understand why your machine name is appended to dll names. Is it only *.Application project or all the projects ?

  • User Avatar
    0
    exlnt created

    This was a one drive sync problem. Please ignore the question.