Author Topic: Error Message in Visual Studio 2008  (Read 64911 times)

xaydin

  • Guest
Error Message in Visual Studio 2008
« on: April 02, 2009, 05:56:31 PM »
Hello, I recently downloaded the WCL personal 6.5 and installed it on my laptop. I am using Visual Studio 2008 professional on Vista Home. When I tried to test the provided demos in VB.NET and C# I received an error from VS.

An error occurred creating the form. See Exception.InnerException for details.  The error is: Could not load file or assembly 'wcl, Version=6.5.2.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

After reading some of the previous posts it may be because I am running Vista.  What are your recommendations to get the framework running?

I have not tried WCL lite nor have I tried it on XP (it would be SP2). Any information given will be most appreciated.

Thank you.

-----------
Xaydin
"If there is a better solution...find it"  - Thomas Edison

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Error Message in Visual Studio 2008
« Reply #1 on: April 05, 2009, 08:53:16 AM »
Install WCL in different location. By default it is installed in C:\program files\WCL but Vista does not allow to access this folder from applications (VS). Install the library to other place.

Nature

  • Guest
Could not load file or assembly 'wcl...
« Reply #2 on: September 14, 2009, 01:10:49 PM »
Hi, I am having a similar problem :

The wcl.dll has been added as a reference to a c#.net code library which is in tern used in a c#.net Windows Forms application, this was built using Visual Studio 2005 and packaged into an MSI. Once the MSI is run on the target machine the wcl.dll appears in the correct Progam Files sub folder alongside the DotNet dll and exe files.

The target machine is running Windows XP Service Pack 2 with DotNet Framework 2.0 installed, are there any other prerequisites for using the wcl.dll?

The full error message is detailed below, this happens when I called the wcl.wclBluetoothRadio.SetName() method but I guess it would happen with any method call to the wcl.dll :

------------------------------------------

type=System.Runtime.InteropServices.COMException
Message : Could not load file or assembly 'wcl, Version=6.6.2.0, Culture=neutral, PublicKeyToken=ecf108583bd9ca73' or one of its dependencies. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)

------------------------------------------
Thanks

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Error Message in Visual Studio 2008 0x800736B1
« Reply #3 on: September 14, 2009, 01:13:29 PM »
Hi,

you have to redistribute vcredist_x86.exe together with your app and install it on target PC. You can find this file in the WCL installation folder.
« Last Edit: September 14, 2009, 02:20:30 PM by Mike Petrichenko »

Nature

  • Guest
Re: Error Message in Visual Studio 2008
« Reply #4 on: September 14, 2009, 01:37:21 PM »
Hi,

I have copied vcredist_x86.exe to the target machine and run it but I am still having the same problem. Also is there a silent install version fo the vcredist_x86.exe available? This is so that we can do deployments over a distributed network without needing a user present to click the dialogs.

Many thanks

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Error Message in Visual Studio 2008
« Reply #5 on: September 14, 2009, 01:41:23 PM »
Please, take a look on this article: http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/cfa882e6-ce6d-4e99-bb3f-36a0b13ba0ca

Yes, redist supports silent install (as it does in WCL installation package).

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Error Message in Visual Studio 2008
« Reply #6 on: September 14, 2009, 01:57:57 PM »
Hi,

I have uploaded the latest vcredist file. You can download it here and try. I this it should solve the problem.

Nature

  • Guest
Re: Error Message in Visual Studio 2008 0x800736B1
« Reply #7 on: September 14, 2009, 02:11:51 PM »
Excellent that fixed it, thanks again
« Last Edit: September 14, 2009, 02:20:11 PM by Mike Petrichenko »

royce

  • Guest
Re: Error Message in Visual Studio 2008
« Reply #8 on: January 13, 2010, 10:25:06 PM »
I'm also seeing an error message like the original post in this thread. 

System.BadImageFormatException was unhandled
  Message="Could not load file or assembly 'wcl, Version=6.7.1.0, Culture=neutral, PublicKeyToken=ecf108583bd9ca73' or one of its dependencies. An attempt was made to load a program with an incorrect format."
  Source="WCLtest4"
  FileName="wcl, Version=6.7.1.0, Culture=neutral, PublicKeyToken=ecf108583bd9ca73"
  FusionLog="=== Pre-bind state information ===\r\nLOG: User = E6400-Win7\\Royce\r\nLOG: DisplayName = wcl, Version=6.7.1.0, Culture=neutral, PublicKeyToken=ecf108583bd9ca73\n (Fully-specified)\r\nLOG: Appbase = file:///C:/d/vc# 2008/WCLtest4/WCLtest4/bin/Debug/\r\nLOG: Initial PrivatePath = NULL\r\nCalling assembly : WCLtest4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.\r\n===\r\nLOG: This bind starts in default load context.\r\nLOG: No application configuration file found.\r\nLOG: Using machine configuration file from C:\\Windows\\Microsoft.NET\\Framework64\\v2.0.50727\\config\\machine.config.\r\nLOG: Post-policy reference: wcl, Version=6.7.1.0, Culture=neutral, PublicKeyToken=ecf108583bd9ca73\r\nLOG: Attempting download of new URL file:///C:/d/vc# 2008/WCLtest4/WCLtest4/bin/Debug/wcl.DLL.\r\nERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.\r\n"
  StackTrace:
       at WCLtest4.Form1.InitializeComponent()
       at WCLtest4.Form1..ctor() in C:\d\vc# 2008\WCLtest4\WCLtest4\Form1.cs:line 15
       at WCLtest4.Program.Main() in C:\d\vc# 2008\WCLtest4\WCLtest4\Program.cs:line 17
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:

Development is on a Win7 64 bit laptop.  I was seeing this message with the WCL installed in \Program Files (X86)\WCL, so I uninstalled WCL and reinstalled in a new directory (not under \Program Files).

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Error Message in Visual Studio 2008
« Reply #9 on: January 13, 2010, 10:46:29 PM »
Hi,

It is always good to check the demo apps before.

Add reference to <WCL_INSTALL_DIR>\redist\Microsoft.VC80.CRT\Microsoft.VC80.CRT.manifest to your assembly references list.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Error Message in Visual Studio 2008
« Reply #10 on: January 13, 2010, 10:47:38 PM »
Also, do not foget to add WCL.DLL into references list as well

royce

  • Guest
Re: Error Message in Visual Studio 2008
« Reply #11 on: January 13, 2010, 11:21:03 PM »
WCL.DLL is in the references list along with the Microsoft.VC80.CRT.manifest.  Still seeing this error.  Any other suggestions?

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Error Message in Visual Studio 2008
« Reply #12 on: January 13, 2010, 11:25:29 PM »
Demo built success?

Also, your project is 64 bit, WCL is 32 bit (I guess).

royce

  • Guest
Re: Error Message in Visual Studio 2008
« Reply #13 on: January 13, 2010, 11:29:30 PM »
DOH!!  Changed my project to 32 bit.  Works now.  Thanks, Mike!!

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Error Message in Visual Studio 2008
« Reply #14 on: January 13, 2010, 11:30:03 PM »
You are very welcome.

 

Sitemap 1 2 3 4 5 6 7