SharpDevelop Community

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

Problem with parsing assembly?

Last post 10-20-2006 9:51 AM by Roland Żerek. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 10-19-2006 10:26 AM

    Problem with parsing assembly?

    Hi all,

    I have a following problem: working on a project with NHibernate and Spring (using integration project for NHibernate). Until I do not reference to NHibernate (being provided in the Spring.Data.NHibernate bundle) I have all Spring.Data.NHibernate code completion information being loaded well. However when I reference project to NHibernate assembly the following errors are reported in an output window in #D. Using newest daily build but it seems that this error was being reported by earlier builds as well.

     
    The error says that I am using incorrect NHibernate version (not the one that Spring is expecting, right?). However as I've mentioned I am using the one that has been bundled with integration project... Is it possible that the problem is somwhere else? 

     

    Following is an error message: 

    Error loading code-completion information for Spring.Data from ?:
    Could not find assembly file.
    Error loading code-completion information for NHibernate from C:\Downloads\Blog\Lib\NHibernate.dll:
    Error loading assembly:
    System.IO.FileLoadException: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
       at System.Reflection.AssemblyName.nInit(Assembly& assembly, Boolean forIntrospection, Boolean raiseResolveEvent)
       at System.Reflection.AssemblyName.nInit()
       at System.Reflection.AssemblyName..ctor(String assemblyName)
       at ICSharpCode.SharpDevelop.Dom.CecilReader.LoadAssembly(String fileName, ProjectContentRegistry registry)
       at ICSharpCode.SharpDevelop.Dom.ProjectContentRegistry.LoadProjectContent(String itemInclude, String itemFileName)
       at ICSharpCode.SharpDevelop.Dom.ProjectContentRegistry.GetProjectContentForReference(String itemInclude, String itemFileName)
    Error loading code-completion information for Spring.Data.NHibernate from C:\Downloads\Blog\Lib\Spring.Data.NHibernate.dll:
    Error loading assembly:
    System.IO.FileLoadException: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
       at System.Reflection.AssemblyName.nInit(Assembly& assembly, Boolean forIntrospection, Boolean raiseResolveEvent)
       at System.Reflection.AssemblyName.nInit()
       at System.Reflection.AssemblyName..ctor(String assemblyName)
       at ICSharpCode.SharpDevelop.Dom.CecilReader.LoadAssembly(String fileName, ProjectContentRegistry registry)
       at ICSharpCode.SharpDevelop.Dom.ProjectContentRegistry.LoadProjectContent(String itemInclude, String itemFileName)
       at ICSharpCode.SharpDevelop.Dom.ProjectContentRegistry.GetProjectContentForReference(String itemInclude, String itemFileName)


    Roland
    Filed under: ,
  • 10-19-2006 12:17 PM In reply to

    Re: Problem with parsing assembly?

    FYI 

    Additionally, checked with VS2005 and there are no such problems.

    Roland
  • 10-19-2006 12:33 PM In reply to

    Re: Problem with parsing assembly?

    Wow :|

    Now I've received reports on all references related to Spring... Please help...

    Error loading code-completion information for Spring.Data.NHibernate from C:\Downloads\Blog\Lib\Spring.Data.NHibernate.dll:
    Error loading assembly:
    System.IO.FileLoadException: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
       at System.Reflection.AssemblyName.nInit(Assembly& assembly, Boolean forIntrospection, Boolean raiseResolveEvent)
       at System.Reflection.AssemblyName.nInit()
       at System.Reflection.AssemblyName..ctor(String assemblyName)
       at ICSharpCode.SharpDevelop.Dom.CecilReader.LoadAssembly(String fileName, ProjectContentRegistry registry)
       at ICSharpCode.SharpDevelop.Dom.ProjectContentRegistry.LoadProjectContent(String itemInclude, String itemFileName)
       at ICSharpCode.SharpDevelop.Dom.ProjectContentRegistry.GetProjectContentForReference(String itemInclude, String itemFileName)
    Error loading code-completion information for Spring.Data from ?:
    Could not find assembly file.
    Error loading code-completion information for Spring.Data.NHibernate from C:\Downloads\Blog\Lib\Spring.Data.NHibernate.dll:
    Error loading assembly:
    System.IO.FileLoadException: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
       at System.Reflection.AssemblyName.nInit(Assembly& assembly, Boolean forIntrospection, Boolean raiseResolveEvent)
       at System.Reflection.AssemblyName.nInit()
       at System.Reflection.AssemblyName..ctor(String assemblyName)
       at ICSharpCode.SharpDevelop.Dom.CecilReader.LoadAssembly(String fileName, ProjectContentRegistry registry)
       at ICSharpCode.SharpDevelop.Dom.ProjectContentRegistry.LoadProjectContent(String itemInclude, String itemFileName)
       at ICSharpCode.SharpDevelop.Dom.ProjectContentRegistry.GetProjectContentForReference(String itemInclude, String itemFileName)
    Error loading code-completion information for NHibernate from C:\Downloads\Blog\Lib\NHibernate.dll:
    Error loading assembly:
    System.IO.FileLoadException: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
       at System.Reflection.AssemblyName.nInit(Assembly& assembly, Boolean forIntrospection, Boolean raiseResolveEvent)
       at System.Reflection.AssemblyName.nInit()
       at System.Reflection.AssemblyName..ctor(String assemblyName)
       at ICSharpCode.SharpDevelop.Dom.CecilReader.LoadAssembly(String fileName, ProjectContentRegistry registry)
       at ICSharpCode.SharpDevelop.Dom.ProjectContentRegistry.LoadProjectContent(String itemInclude, String itemFileName)
       at ICSharpCode.SharpDevelop.Dom.ProjectContentRegistry.GetProjectContentForReference(String itemInclude, String itemFileName)
    Error loading code-completion information for Spring.Data.NHibernate from C:\Downloads\Blog\Lib\Spring.Data.NHibernate.dll:
    Error loading assembly:
    System.IO.FileLoadException: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
       at System.Reflection.AssemblyName.nInit(Assembly& assembly, Boolean forIntrospection, Boolean raiseResolveEvent)
       at System.Reflection.AssemblyName.nInit()
       at System.Reflection.AssemblyName..ctor(String assemblyName)
       at ICSharpCode.SharpDevelop.Dom.CecilReader.LoadAssembly(String fileName, ProjectContentRegistry registry)
       at ICSharpCode.SharpDevelop.Dom.ProjectContentRegistry.LoadProjectContent(String itemInclude, String itemFileName)
       at ICSharpCode.SharpDevelop.Dom.ProjectContentRegistry.GetProjectContentForReference(String itemInclude, String itemFileName)
     

    Roland
  • 10-19-2006 1:57 PM In reply to

    Re: Problem with parsing assembly?

    The NHibernate assembly has invalid values for the public key token as discussed in this thread.

    As a workaround, you should be able to use SharpDevelop 2.0 and add a reference to the NHibernate assembly.

  • 10-19-2006 2:43 PM In reply to

    Re: Problem with parsing assembly?

    Thanx for hint :)

    BTW - what if I will start using assemblies being built from sources? Is there an easy way to fix this in sources to make the problem dissappear completely? 

    Roland
  • 10-19-2006 6:12 PM In reply to

    Re: Problem with parsing assembly?

    Without looking at the NHibernate source code I'm not sure if building from source code would fix the problem or what needs to be modified. Building from sources might fix the public key token problem so worth a try if you have time. It might not work though. I briefly looked at trying to compile the CastleProject source code, it includes NHibernate, but it didn't work immediately and I didn't have the time to look into it. I was mainly doing this to see how they managed to get an odd public key token into the assembly.

    Apart from getting NHibernate to fix their assembly we could look into getting SharpDevelop handling this problem, not a hack, but working around the public key being invalid somehow. 

  • 10-20-2006 9:51 AM In reply to

    Re: Problem with parsing assembly?

    I've replaced all references in Spring NHibernate integration project from existing there assembllies (those suspicious) to my own (build by me from source - SVN trunk) - these were Castle.DynamicProxy, Iesi.Collections and NHibernate (of course). Also rebuilt integration project.

    Then I reference these in my project and I see no problems anymore. Maybe, meanwhile, they've fixed something :)

    However, I think it could be also good if #D tolerates such issues. On the other side we have an opportunity to discover some problems with assemblies what might lead to avoid other problems during production...

    Thanx for your assistance :) 

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