Main Site Documentation

EMX Updata problem


#1

Before updating EMX I can debugging my project well.
After updating “GHI Software Package v4.2 Feb. 18, 2013”, I can’t debugging my project now.

There is something notes in output window as follow:


   Assembly: GHI.Premium.System (4.2.9.0)  Attaching deployed file.

   Assembly: Microsoft.SPOT.Net (4.2.0.0)  Attaching deployed file.

   Assembly: GHI.Premium.Hardware (4.2.9.0)  Attaching deployed file.

   Assembly: GHI.Premium.Hardware.EMX (4.2.9.0)  Attaching deployed file.

   Assembly: NetMf.CommonExtensions (1.0.0.0)  Resolving.

Link failure: some assembly references cannot be resolved!!


Assembly: FezCobraWorkhard (1.0.0.0) needs assembly 'NetMf.CommonExtensions' (1.0.0.0)

Assembly: NetMf.CommonExtensions (1.0.0.0) needs assembly 'mscorlib' (4.1.2821.0)

Error: a3000000

Waiting for debug commands...

The program '[1] Micro Framework application: Managed' has exited with code 0 (0x0).

I have used a dll file “NetMf.CommonExtensions” for “string.replace”.

how can I resolved the problem?


#2

Is this a new project?


#3

You need to rebuild NetMf.CommonExtensions assembly:


Assembly: NetMf.CommonExtensions (1.0.0.0) needs assembly 'mscorlib' (4.1.2821.0)

The one you are using is build against NETMF 4.1 the rest of your project is 4.2


#4

@ Gus -

no, it’s old project. I used always “GHI NETMF v4.1 SDK”. The project ran well with “.NET Micro Framework 4.1” before updating EMX.


#5

Change target framework to 4.1 in your project then.


#6

@ Architect -

If I change target framework to 4.1 in my project, I got error after rebuilding as follow.


Error	20	Could not copy the file "C:\Users\Tobi\Documents\Visual Studio 2010\Projects\ECOLINE_Project\FezCobraWorkhard\bin\Debug\LE\GHI.Premium.USBHost.pe" because it was not found.	ECOLINE
Error	19	Could not copy the file "C:\Users\Tobi\Documents\Visual Studio 2010\Projects\ECOLINE_Project\FezCobraWorkhard\bin\Debug\LE\GHI.Premium.System.pe" because it was not found.	ECOLINE
Error	18	Could not copy the file "C:\Users\Tobi\Documents\Visual Studio 2010\Projects\ECOLINE_Project\FezCobraWorkhard\bin\Debug\LE\GHI.Premium.IO.pe" because it was not found.	ECOLINE
Error	16	Could not copy the file "C:\Users\Tobi\Documents\Visual Studio 2010\Projects\ECOLINE_Project\FezCobraWorkhard\bin\Debug\LE\GHI.Premium.Hardware.pe" because it was not found.	ECOLINE
Error	17	Could not copy the file "C:\Users\Tobi\Documents\Visual Studio 2010\Projects\ECOLINE_Project\FezCobraWorkhard\bin\Debug\LE\GHI.Premium.Hardware.EMX.pe" because it was not found.	ECOLINE



#7

What version of the framework is on your board?


#8

Are you sure you are using the right source code?

Assemblies that start with GHI.Premium.* are 4.2 assemblies. You have to make sure that you are using same version of the framework in all 3 below:

  1. Firmware on your board
  2. SDK you are using to build your application
  3. Any third party assemblies you are using (like NetMf.CommonExtensions)

#9

@ Architect -

1. The files of updating is as follow (see picture)


C:\Program Files\GHI Electronics\GHI Premium NETMF v4.2 SDK\EMX\Firmware\TinyBooter\TinyBooter.GHI

C:\Program Files\GHI Electronics\GHI Premium NETMF v4.2 SDK\EMX\Firmware\Config.hex;C:\Program Files\GHI Electronics\GHI Premium NETMF v4.2 SDK\EMX\Firmware\Firmware.hex;C:\Program Files\GHI Electronics\GHI Premium NETMF v4.2 SDK\EMX\Firmware\Firmware2.hex;

2. I have checked my SDK, it’s the latest vision form GHI Homepage. “Microsoft .NET Micro Framework 4.2 QFE2 SDK”

3. I’m not sure the vision of “NetMf.CommonExtensions”, I have downloaded from http://netmfcommonext.codeplex.com/ I havn’t found the vision of this library file


#10

I have tried my project again and the project ran well after removing the “NetMf.CommonExtensions” from References, deleting “using NetMf.CommonExtensions;”, and any “string.replace” method. so I think my source code is well.

I just need the “string.replace” method, and the method is very useful for my project.

I have also found a new Warning in Error List that I haven’t ever seen , if I add the “NetMf.CommonExtensions” again to References and rebuild the project. as follow:


Warning	1	The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is 
defined in multiple assemblies in the global alias; using definition from 'c:\Program
 Files\Microsoft .NET Micro Framework\v4.2\Assemblies\le\mscorlib.dll'	ECOLINE

I’m not very sure what the warning means, but it seems that it have relation to “mscorlib.dll”


#11

@ workhard10 - There is a string replace in the StringBuilder class.