SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

SharpSnippetCompiler - Adding library Project into the Snippet project (EntityDeploy error)

Last post 02-09-2010 7:43 AM by lsdisciples. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 02-08-2010 1:16 PM

    SharpSnippetCompiler - Adding library Project into the Snippet project (EntityDeploy error)

    i,

    I'm trying to modify the SharpSnippetCompiler example in order to Add a Class library project into the existing project.

    My "Snippet" look like :
    c:\Projects\Snippet1\* (the exe , same as Snippet example)
    But with a second project class library (c:\OTHER_DIR\SharedLib\*) added directly in it.  The .exe is using the library by adding a Project reference to the library.

    Note : The project is created with SharpDevelop to make sure it's valid and the projects creations process is not involved in SharpSnippet

    1- I create an empty C# class library project in SharpDevelop and close the solution
    2- I Create an empty c# Win application project in SharpDevelop and Add exiting project (the library) to it and then add a project reference to this library
    3- Compile and run well in SharpDevelop, now I want to compile it in the SharpSnippet

    4- In the *sharpSnippetCompiler* the project seems to be loaded correctly
    5- A change was made to get the Top level solution project (the .exe) since the example only manage a single project (ProjectService.CurrentProject=...The exe Iproject)
    6- In the "build current" menu handler the Run command is done with the Top level project (the .exe)

    I get 2 errors MSB4060, MSB4127:
    -----------------------
    Error : The "EntityDeploy" task has been declared or used incorrectly, or failed during construction. Check the spelling of the task name and the assembly name. (MSB4060)
    Error : The "EntityDeploy" task could not be instantiated from the assembly "c:\Windows\Microsoft.Net\V3.5\Microsoft.Data.Entity.Build.Tasks.dll" Please verify the task assembly has been built using the same version of the Microsoft.Build.Framework assembly as the one installed on your computer and that your host application is not missing a binding redirect for Microsoft.Build.Framework.  Unable to cast the object of type "Microsft.Data.Entity.Build.Tasks.EntityDeploy" to type "Microsoft.Build.Framework.ITask (MSB4127)
    ------------------------

    Is anybody know why I'm getting theses errors? any clues?

    Thanks,

    Michel

  • 02-08-2010 1:22 PM In reply to

    Re: SharpSnippetCompiler - Adding library Project into the Snippet project (EntityDeploy error)

    The SharpSnippetCompiler.exe project has an "app.config" containing a binding redirect that's necessary for using MSBuild 3.5.

    If you use the snippet compiler in your own .exe project, make sure you include the binding redirect in your app.config.

  • 02-08-2010 2:08 PM In reply to

    Re: SharpSnippetCompiler - Adding library Project into the Snippet project (EntityDeploy error)

    Not really sure about what to do with your advise... :

    In SharpSnippetCompiler I have this in app.config

    <runtime>
     <assemblyBinding>
      <dependentAssembly>
       <assemblyIdentity name="Microsoft.Build.Framework" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
       <bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="3.5.0.0"/>
      </dependentAssembly>  
     </assemblyBinding>
    </runtime> 

     So I create a new App.config for both TestProject (the .exe) and the library dll project. (The runtime section is everywhere..just to try ;))

    I'm directly using the SharpSnippetCompiler example to compile both files and still get the errors.  I suppose your advise was just to keep in mind that app.config runtime section is needed, but in my case no changes is needed in app.config since im directly using the original version of SharpSnippetCompiler...Right?

  • 02-09-2010 7:43 AM In reply to

    Re: SharpSnippetCompiler - Adding library Project into the Snippet project (EntityDeploy error)

    Ok, Creating my dll with the SharpSnippet instead of SharpDevelop seems to fix this particular problem.

    Thanks again for trying to help

    Now need to get back to work :))

     

     

     

Page 1 of 1 (4 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.