Reading a TCA-File from USB-Stick (4GB, FAT32 ) throws error after calling updater.VerifyApplication().
The chunk size is set to 1024 Byte.
#### Exception System.ArgumentException - 0xfd000000 (3) ####
#### Message:
#### GHIElectronics.TinyCLR.Update.InFieldUpdate::NativeAuthenticateApplication [IP: 0000] ####
#### GHIElectronics.TinyCLR.Update.InFieldUpdate::VerifyApplication [IP: 0016] ####
#### Basic_Test.Program::backgroundThreadHandler [IP: 001f] ####
Ausnahme ausgelöst: "System.ArgumentException" in GHIElectronics.TinyCLR.Update.dll
Ein Ausnahmefehler des Typs "System.ArgumentException" ist in GHIElectronics.TinyCLR.Update.dll aufgetreten.
The same TCA file is working with TinyCLR-Config.
The code i used is mainly from the documentation.
var filestreamApp = new FileStream(appfilename, FileMode.Open);
var idxApp = 0;
while (idxApp < filestreamApp.Length)
{
var count = filestreamApp.Read(dataChunk, 0, dataChunk.Length);
idxApp += updater.LoadApplicationChunk(dataChunk, 0, count);
}
updater.LoadApplicationKey(appKey);
Debug.WriteLine("Verifying application.... ");
Debug.WriteLine("Application version: " + updater.VerifyApplication());
I also tried it with other USB sticks → same problem.
Extend heap and extend deployment is enabled.
I also double-checked the application key. (copy from created file from TinyCLR-Config)
I found the issue that was preventing a proper update via USB in my case.
Somtimes TinyCLR-Config (or Win10) creates the TCA-File with the timestamp 01.01.2017.
when this occurs → no IFU is possible and the exception is thrown.
This happens 8 out of 10 times with random noname USB sticks (4GB).
I couldn’t reproduce it with an Intenso (8GB).