Wrox Programmer Forums
|
Visual Studio 2008 For discussing Visual Studio 2008. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2008 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 12th, 2013, 12:14 AM
Registered User
 
Join Date: Oct 2013
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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(Obje ct 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
 
Old November 12th, 2013, 11:24 PM
Registered User
 
Join Date: Oct 2013
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
use of class library Theone84 C# 1 July 26th, 2008 02:19 AM
Using a class library Kiran Patil VS.NET 2002/2003 0 August 19th, 2006 05:52 AM
Regarding Class Library (.dll) from class file manish.sharma04 BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 1 March 3rd, 2006 07:32 AM
Class Library ~Bean~ ASP.NET 1.x and 2.0 Application Design 3 October 17th, 2005 07:55 AM
Error message: old format or invalid type library kaz .NET Framework 2.0 2 October 6th, 2004 12:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.