开发者

EntityDataModelEmbeddedResources parameter is not supported by the EntityDeploy task

开发者 https://www.devze.com 2023-04-12 12:33 出处:网络
On some computers (and some others not!) I\'m getting this error from MSBuild 4.0 when building a 3.5 solution:

On some computers (and some others not!) I'm getting this error from MSBuild 4.0 when building a 3.5 solution:

C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Data.Entity.targets(43,7): error MSB4131: The "EntityDataModelEmbeddedResources" parameter is not supported by the "EntityDep开发者_Go百科loy" task. Verify the parameter exists on the task, and it is a gettable public instance property. [C:\prg\myproject.csproj]

This project doesn't even use EF and the csproj doesn't reference that 'targets' file anywhere.

Has anyone seen this? Any ideas?


This is less than ideal, but as a workaround, I just removed the contents of the EntityDeploy target in C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Data.Entity.targets . It works. Hopefully someone will come along here with a better solution and a reasonable explanation for this.


I actually had this problem thrown today with a project I was messing with. Turns out simply replacing "C:\Windows\Microsoft.NET\Framework\v4.0.30319" with "C:\Windows\Microsoft.NET\Framework\v3.5" in my PATH I got a clean build.

If other people are having trouble and have .Net 3.5 and 4 installed, you may want to try changing your path vars and calling the other version of msbuild. Many thanks for pointing me in the right direction with this.


Solution on this site may resolve this issue... http://blogs.microsoft.co.il/blogs/idof/archive/2008/11/24/what-does-entity-framework-has-to-do-with-msbuild.aspx

However, this may be a conflict with version 4.0 and 3.5 of the Build Framework.

So a version of App.Config that should work is:

 <?xml version="1.0"?>
  <configuration>
   <runtime>
     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
         <assemblyIdentity name="Microsoft.Build.Framework"
                  publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
         <bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="4.0.0.0"/>
      </dependentAssembly>
     </assemblyBinding>
   </runtime>
  </configuration>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号