Microsoft.Data.Edm

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
8 years ago
Any solution to this problem?

I get the same error everytime I build or rebuild a plugin.
8 years ago
Any solution to this problem?

I get the same error every time I rebuild a plugin.

I noticed that, after rebuilding a plugin the Microsoft.Data.Edm.dll from Nop.Web\bin folder is version 5.6.4.62175.

But after building Nop.Services again, Microsoft.Data.Edm.dll is version 5.7.0.62414 and the error goes away.

(I can't edit the post above)
8 years ago
I think that's a Possible bug of Nop or VS

as Alex said Nop.Services dependant to the Microsoft.Data.Edm but why is pulling the wrong dll ?

i've tried many ways to achieve it but couldn't find any correct solution beside referencing the dll and copying to plugin directory.

**** Temporary Solution ****

Reference the Microsoft.Data.Edm from packages folder
and set Copy Local propert to `True`

OR

Just Copy the .dll file from packages to plugin directory

**** Temporary Solution ****
8 years ago
Ok so, as far as i can found: if i reference the dll from package, csproj file version is like below.



I cannot dig in to the problem cause, i don't have time for now. Hope someone will find.

Can't edit the post above, maybe it's a better solution.

I removed the build dependencies of plugin by referencing the nop dll's directly.(as Alex Wolf's mentioned on pluralSight Course). And it works for now !

Step by step
1. Unload your plugin project and edit the .csproj by right clickin on it
2. See if any dll referencing to data edm and delete the lines
3. Load the project again
4. Remove the Nop Libraries from References(Nop.Data, Nop.Core, Nop.Services, Nop.Web.Framework)
5. Reference the Nop Libraries that you have just deleted from bin directories
6. Right click on plugin project select Build Dependencies
7. Uncheck all dependencies
8. Clean and Rebuild solution and it Works!

Hope it helps...
8 years ago
i have had the exact same issue with all my plugins that i made, they worked local, but when i publish the project, i am getting the Microsoft.Data.Edm error, i had no choice but to add a reference to the Microsoft.Data.Edm and set it to Copy Local,as described here, and that helped, thank you guys for bringing this to the attention of others.

i guess this should be mentioned in the bug report, so we can work on a fix for that, because this solution is just a workaround :(
8 years ago
Hi guys,

Been having the same problem with a fresh download and install of NOP 3.7.

Just my experience but dbl clicking the sln file opens Nop in VS 2012 because VS2012 is whats pointed to in the properties.

If you ignore that and open NOP with VS2013 or above & then re-build the app the problem with the Microsoft.Data.Edm file does not occur.
8 years ago
here is what helped my situation.

http://stackoverflow.com/questions/36487542/keep-getting-could-not-load-microsoft-data-edm/36541304#36541304
7 years ago
Go into Web.config of Nop.Web and delete all references to Microsoft.Data.Edm. Nop.Web is expecting 5.7.0.0 while something is copying 5.6.0.0 into bin folder. Problem solved.
7 years ago
Here is the solution:

I had the exact same problem described in the original question in this thread, with a custom plugin I created in nopCommerce 3.70.

I discovered that my plugin's .csproj file showed the reference to Microsoft.Data.Edm as this:

<Reference Include="Microsoft.Data.Edm, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
   <HintPath>..\..\packages\Microsoft.Data.Edm.5.7.0\lib\net40\Microsoft.Data.Edm.dll</HintPath>
   <Private>False</Private>
</Reference>

Notice the discrepancy between the version in the <Reference> tag and what is shown in the <HintPath>

Here is the solution:

1. Manually modify the .csproj file (with the project UNLOADED or VS closed) to have this entry instead of the above:

<Reference Include="Microsoft.Data.Edm, Version=5.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
   <HintPath>..\..\packages\Microsoft.Data.Edm.5.7.0\lib\net40\Microsoft.Data.Edm.dll</HintPath>
   <Private>True</Private>
</Reference>

2. Adding the above fixes the build-time issue of being unable to find Microsoft.Data.Edm. But then in my case it complained about not finding two additional related dependencies. So I added these two additional entries to the .csproj file just below the Microsoft.Data.Edm entry I show above:

<Reference Include="Microsoft.Data.OData, Version=5.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <HintPath>..\..\packages\Microsoft.Data.OData.5.7.0\lib\net40\Microsoft.Data.OData.dll</HintPath>
      <Private>True</Private>
</Reference>
<Reference Include="Microsoft.Data.Services.Client, Version=5.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
    <HintPath>..\..\packages\Microsoft.Data.Services.Client.5.7.0\lib\net40\Microsoft.Data.Services.Client.dll</HintPath>
      <Private>True</Private>
</Reference>


With the above 3 references: Load the solution, clean, then build. Problem permanently solved now.

- HTH
7 years ago
any solution yet for this problem? none of the above helped in my case.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.