urgent: invalid format of a class library
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: urgent: invalid format of a class library

  1. #1
    Join Date
    Nov 2013
    Posts
    7

    urgent: invalid format of a class library

    I am using VB.net 2008 and .net 2.0 framework. After I modified a class library in development environment, I build a particular class library in visual studio 2008 and dll file get generated in the bin directory.

    I copied this dll file to the bin directory in production environment. But I got the following error. The .net framework in production is running ver 2.0. Please help. Thanks a lot.

    ------------------------------------------------------------------------------------------------------
    Server Error in '/alp/m' Application.
    ------------------------------------------------------------------------------------------------------

    The format of the file 'Classlibrary' is invalid.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.BadImageFormatException: The format of the file 'Classlibrary' is invalid.

    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Assembly Load Trace: The following information can be helpful to determine why the assembly 'Classlibrary' could not be loaded.

    === Pre-bind state information ===
    LOG: DisplayName = Classlibrary, Version=1.0.3069.18998, Culture=neutral, PublicKeyToken=null
    (Fully-specified)
    LOG: Appbase = file:///c:/webapp/alp/m
    LOG: Initial PrivatePath = bin
    Calling assembly : EM.main, Version=1.0.3069.19003, Culture=neutral, PublicKeyToken=null.
    ===

    LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
    LOG: Post-policy reference: Classlibrary, Version=1.0.3069.18998, Culture=neutral, PublicKeyToken=null
    LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/alp_mchd/69165f10/4d09ca79/Classlibrary.DLL.
    LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/alp_mchd/69165f10/4d09ca79/Classlibrary/Classlibrary.DLL.
    LOG: Attempting download of new URL file:///c:/webapp/alp/m/bin/Classlibrary.DLL.

    Stack Trace:

    [BadImageFormatException: The format of the file 'Classlibrary' is invalid.]
    EM.main.Web.Common.WebPageBaseClass.Page_Load(Object sender, EventArgs e) +0
    System.EventHandler.Invoke(Object sender, EventArgs e) +0
    System.Web.UI.Control.OnLoad(EventArgs e) +67
    System.Web.UI.Control.LoadRecursive() +35
    System.Web.UI.Page.ProcessRequestMain() +750

  2. #2
    Join Date
    Nov 2013
    Posts
    7

    Re: urgent: invalid format of a class library

    I got it resolved due to different .net framework version. Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center