Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 3.5 and Visual Studio. 2008 > Visual Studio 2008
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 11th, 2013, 11:14 PM
Registered User
Points: 30, Level: 1
Points: 30, Level: 1 Points: 30, Level: 1 Points: 30, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Reply With Quote
  #2 (permalink)  
Old November 12th, 2013, 10:24 PM
Registered User
Points: 30, Level: 1
Points: 30, Level: 1 Points: 30, Level: 1 Points: 30, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 06: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



All times are GMT -4. The time now is 05:37 AM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.