MFDeploy has linker and signature error on deploy

I tried to deploy my app with MFDeploy tool.
FW 4.2.7.0
SDK 4.2.0.0 (QFE2)
Cobra I (EMX)

I created an app with several dll’s and an exe. I can deploy and debug it without a problem with VisualStudio
The I create an hex file with MFDeploy (works)
But when I try to deploy the hex file (on same board, with or without erasing before) I get an Messagebox wich says:
"Error: Signature chech failed for file …hex"
The log window says:


Pinging... TinyCLR
Created EE.
Started Hardware.
Create TS.
 Loading start at a0e00000, end a0e1383c
   Assembly: mscorlib (4.2.0.0)     Assembly: Microsoft.SPOT.Native (4.2.0.0)     Assembly: Microsoft.SPOT.Security.PKCS11 (4.2.0.0)     Assembly: System.Security (4.2.0.0)  Loading Deployment Assemblies.
Resolving.
Link failure: some assembly references cannot be resolved!!

Assembly: Microsoft.SPOT.Security.PKCS11 (4.2.0.0) needs assembly 'Microsoft.SPOT.Hardware' (4.2.0.0)
Assembly: System.Security (4.2.0.0) needs assembly 'Microsoft.SPOT.Security.PKCS11' (4.2.0.0)
Error: a3000000
Waiting for debug commands...

The same linker error also comes after I do an Erase with MFDeploy, as if there is something wrong in the Firmware or SDK!?
I use the same board in VS and MFDeploy so I assume it’s not a version conflict

I tried this with and without signing

Is there any known problem regarding this?

How did you create the hex file you are deploying?

I created it with MFDeploy. 1st Deploy with Visual Studio, then use MFDepoly “Target->something->Create Application Depoly” or so
I tried with and without key file, and with and without writing the key to the device of course.

But I can not deploy the hex file with MFDeploy.
The Linker error also appears when I Click Erase Button in MFDeploy.

Now that I have a Cobra I board on my table I did some more tests.
1st I created a minimum console app which is blinking a LED on Cobra board (IO48)
The app has minimum references:

  • Microsoft.SPOT.Hardware
  • Microsoft.SPOT.Native
  • mscorlib

I can deloy/debug it just fine with VS2010.
I also can create a hex file of my app with MFDeploy (Menu->Target->Application Deployment->Create Application Deployment)
I do not use any key files, so I get no .sig file. There is also no key on the Cobra.
I also tried to sign the hex file with an empty key file (created with MFDeploy), no differance.

As next step I uploaded the firmware again, to have a clean device.
When I deploy my hex file with MFDeploy I get the linker and signature failure as described above.
Even when I press the ‘Erase’ Button in MFDeploy I get the linker errors in the output window.

The funny thing is:
After I deploy my hex file with the signature failure, and I reboot the device then, my app is running (LED is blinking)
But I’m still a bit worried if the update is correct/complete.

One reason I can think of for this is that MFDeploy tries to start some deploy program on the device which can not load some security functions.
After the deploy the signature check fails because the security functions are not available.
Sounds feasible? Must be a bug in the Firmware or NETMF then!?

What I actually try to do is updating a device from an PC without VS being installed.
So we could connect to a customers computer via VPN/RDP, copy the latest hex file to it, use MFDeploy to transfer the hex file to the device which is connected via USB to the computer.
Next step would be to automate this process via the MFDeployEngine library.
As soon as IFU is available on 4.2.x we will use this, but as I see this may take a while until it is available.

Has anyone done something similar like this?
Can I use some other tool to do so?
Does onyone know the differance between VS and MFDeploy deploy?

We are shipping the device out of the country in a week, so this is a bit urgent now (and makes me work during my holidays.

Make sure you have .Net 3.5 SP1 installed. I had signature issues until I installed this older version of the framework.

Thank you for the hint.
But how do I install .net 3.5 SP1 on Windows 7 (which includes already .net 3.5) when .net 4.0 is already installed?
When I run the netfx35.exe setup it extracts alle files and then nothing happens!?
.net 3.5 also does not appear in installed programs or installed updates.

Edit:
I just double checked: Win 7SP! includes .net 3.5 SP1, so I can not install it seperatly.

The signature problem appears on all 3 computers on which we tried it (2x Win 7 SP1 x64, 1x Win 7 SP1 x86)

Hi,
I am not sure that issue comes from MFDeploy or not, but you can use EMX Updater to deploy your application.
In EMX Updater we also check sig file, so if EMX Updater reports successful I think there is no problem. It also means EMX Updater requires a sig file :))
Because EMX Updater only updates firmware, but you can put your hex+sig files to folder that contain EMX firmware, it is usually:
C:\Program Files (x86)\GHI Electronics\GHI Premium NETMF v4.2 SDK\EMX\Firmware,
then try to updater firmware, EMX Updater will deploy your application too, :))
In the future, probably we will separate this function in our Updater, so user can deploy an application without update firmware.

@ Dat, with EMX updater and your instructions I could deploy my app succesfully.
I signed my hex file with an empty key (like MFDeploy can create it) and it worked on 1st try.
It takes a bit longer and requires a reboot under some special signals on some GPIOs, but it works without error.
I will post the issue to the NETMF issue tracker and see what answer I’ll get there.

But I’m still curious about this. Why does no one had this error before.
I have it on 3 different PC’s and 2 different Cobras. Unfortuenatelly I have currently no accesss to my G120 to test it with this as well.

So if anyone finds some time please try as follows:
Connect your device (EMX, G120, …) using a NETMF 4.2 (QFE2)
Start MFDeploy
Select USB and your device
Click on Erase
If you get any similar output (as in my 1st post) with linker errors in the output window, then let me know.
I just would like to nail down if this is a NETMF 4.2 or any other issue.

Edit:
here is a link to the codeplex issue:
http://netmf.codeplex.com/workitem/1868

I always do that at least 10-50 times every day :)), but I don’t see any output like yours. I only had a problem when I tried to deploy a hex file by MFDeploy. If there is only Erase, it should be OK.

The biggest difference between my and a lot of other systems is the Windows language: Mine is German.
Could this be a problem?

@ Reinhard Ostermeier - There is a known issue with Visual Studio 2010 with Windows Localization set to anything other than English, but I am not aware of any reports of this effecting MFDeploy, but it is a good place to try!

Unfortuenatelly I have no English OS here, so I will try when I’m back at office on 7th of January.

@ Reinhard Ostermeier - Can you not set the default language to English in the Region and Localization settings of Windows? If not, you may simply need a language pack, and not a complete OS reinstallation

This really depends on the Windows version, eg Professional. Micrisoft is pretty funny about which levels can use language packs. Usually only ultimate/volume license key versions…

Fortunatelly I have Win7 Ultimate, so I switched everything to US English. But this did not change anything.

But after playing around with MFDeploy I found an option in the Plugin->Debug menu: Deploy with PortBooter.

If I click this menu entry before I deploy, I get no signature error anymore. But the Linker-Error stays the same.
I think now the linker error is a sided effect of the erase command, which is also automatically done before the deploy.
I assume that VS does not erase before deploying, because it is alwys logging something like ‘incremental deploy’.

@ Reinhard

More or less the same experience here with deploying an application to FEZ Cerberus.
Clicking the “deploy with portbooter” menu option makes the signature error disappear on my system as well.

Thanks