none
Microsoft.Data.Edm and multiple project in a solution RRS feed

  • Question

  • OK. So I've got a solution with several projects, some of them DLLs some of them webs. The webs all reference Microsoft.Data.Edm, the same version!

    If I build the solution, all the web projects, mapped to the local IIS, work fine. If I select one of the webs as the Start up project and attempt to debug it, first VS 2015 wastes several minutes rererecompiling the recently rerecompiled solution and then starts the web in question. The catch is that all the others stop working and complain that 

    Server Error in '/' Application.

    Could not load file or assembly 'Microsoft.Data.Edm' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

    Even though the other web is in a different application pool in the IIS.

    Any idea what the [censored] could be the problem? Or who to kill for causing it?

    Thanks!


    http://jendaperl.blogspot.com<br/> A Perl developer in the world of C#

    Tuesday, December 20, 2016 5:25 PM

All replies


  • Hi  JendaPerl,

    Do you try to delete the bin, temp folder and obj folders and rebuild and then it works fine?

    May be your project isn't reference this dll directly, when build, your project will find an old version from the GAC or other place. You can try to solve it by explicit reference this dll in a project from the right location.

    You can also try to uninstall Microsoft.Data.Edm packages. Then install again and make sure you only install the specific version.

    Best Regards,

    Yohann Lu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, December 21, 2016 7:04 AM
    Moderator
  • Yes, I deleted all bin, obj and temp folders and it made no difference. All work after a solution build, all but the debugged one stop working after F5.

    

    There are no other versions of the library in the solution, NuGet for the solution shows 5.8.1 for all projects.

    All packages.config contain <package id="Microsoft.Data.Edm" version="5.8.1" targetFramework="net452" /> and all web.config and app.config files contain

          <dependentAssembly>
            <assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-5.8.1.0" newVersion="5.8.1.0" />
          </dependentAssembly>

    Visual Studio is set to compile for Debug Any CPU.


    http://jendaperl.blogspot.com<br/> A Perl developer in the world of C#

    Wednesday, December 21, 2016 11:29 AM

  • Hi JendaPerl,

    Thank you for your more information. I made a sample test on my side and there is no problem. I am also confused.

    May you can try to  uninstall Microsoft.Data.Edm packages and clear all the caches below the folder.

    Caching in the project:

    Caching in the computer:

    Then install again.

    If that does not work, I suggest you upload a test project to OneDrive, so that we can test it.

    Best Regards,

    Yohann Lu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, December 22, 2016 8:49 AM
    Moderator