none
RegAsm error: Failed to load 'XXXXX.dll' because it is not a valid .Net assembly VS2010 RRS feed

  • Question

  • Hi,

      I am geting the above error on a project that i have just moved form vs2005 to vs2010.  I have seen a similar post from 2007 but that pointed to a miss match in .net versions.  I do not belive this is the case here as i have check the version (4.0) and that looks ok. I have also opened the assably using Reflector and can see no problems.   Where should i look now?

    • Edited by Steven Evans Tuesday, June 1, 2010 3:05 PM spelling
    Tuesday, June 1, 2010 3:03 PM

Answers

  • Yes.  I think I found the issue a third party assembly is unsing v2.0.  change my builds to use V2.0 and all is fine.   Just for information; how does Regasm handle depenances on multiple frameworks (e.g. you build a v4 assembly referancing an assembly requiring v2.0 say)?
    • Marked as answer by eryang Friday, June 18, 2010 7:41 AM
    Wednesday, June 2, 2010 8:40 AM
  •  

    The error occurred when you try to register a .NET 4.0 assembly with Regasm.exe of .NET 2.0, regardless whether the target assembly referencing .NET 2.0 assembly or .NET 4.0 assembly.

    I Fixed the issue by downloading the 2.0 sdk and using its Regasm.exe.  I have also set all my assemblies to use 2.0.   However I dont undersand you responce above. 
    • Marked as answer by Steven Evans Thursday, June 24, 2010 7:45 AM
    Wednesday, June 9, 2010 11:14 PM

All replies

  • Are you running a pre .NET 4.0 version of regasm?
    Phil Wilson
    Tuesday, June 1, 2010 9:54 PM
  • Yes.  I think I found the issue a third party assembly is unsing v2.0.  change my builds to use V2.0 and all is fine.   Just for information; how does Regasm handle depenances on multiple frameworks (e.g. you build a v4 assembly referancing an assembly requiring v2.0 say)?
    • Marked as answer by eryang Friday, June 18, 2010 7:41 AM
    Wednesday, June 2, 2010 8:40 AM
  •  

    The error occurred when you try to register a .NET 4.0 assembly with Regasm.exe of .NET 2.0, regardless whether the target assembly referencing .NET 2.0 assembly or .NET 4.0 assembly.


    Sincerely,
    Eric
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, June 2, 2010 10:27 AM
  • Hi Steven,

    I'm writing to check the issue status, please feel free to let us know if you have any concern.


    Sincerely,
    Eric
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Tuesday, June 8, 2010 5:10 AM
  •  

    The error occurred when you try to register a .NET 4.0 assembly with Regasm.exe of .NET 2.0, regardless whether the target assembly referencing .NET 2.0 assembly or .NET 4.0 assembly.

    I Fixed the issue by downloading the 2.0 sdk and using its Regasm.exe.  I have also set all my assemblies to use 2.0.   However I dont undersand you responce above. 
    • Marked as answer by Steven Evans Thursday, June 24, 2010 7:45 AM
    Wednesday, June 9, 2010 11:14 PM
  •  

    Sorry for my confusing words.

     

    .NET 4.0 assembly can reference to .NET 2.0 assemblies, when we use 2.0 regasm against 4.0 assembly, we get the regasm error, it is the 4.0 assembly trigger the regasm error, no matter whether the 4.0 assembly reference to a 2.0 assembly.


    Sincerely,
    Eric
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, June 10, 2010 2:42 AM
  • Hi Steven,

    Do you have any concern on this issue now?


    Sincerely,
    Eric
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, June 16, 2010 9:30 AM
  • I think i am good. If I have it right i can referance assemblies using 2.0 with in 4.0 assembly; but not 4.0 assemblies with in 2.0 assembly

    Thursday, June 24, 2010 7:48 AM
  • Im facing a similar problem but I have .NET v3.5 SP1 installed and the Regasm.exe of .NET 2.0.5. I'm moving my project from vs2005 to vs2008. Which sdk should I download?

    Thanks.

    Wednesday, July 14, 2010 6:32 PM