I have come across a strange problem which I would like to get your help about.
In my mobile app the program writes a windows C# program (and dependencies) on SD-card so that user can run it on his PC when SD-card is mounted on PC.
The program and dependencies are copied at root level like this.
- myprogram.exe
-
myprogram.exe.config [Just for info : config has the runtime
binding and Libs folder] -
Libs\Interop.iTunesLib.dll
I received an error report from a user like this. I could not reproduce this on my end
OS Version: Microsoft Windows NT 6.1.7601 Service Pack 1
Assembly version: 1.0.0.0
CurrentDirectory: C:\Users\yasd\AppData\Local\Temp\WPDNSE\SID-{10001,SECZ9519043CHOHB,4820242432}
Problem: Could not load file or assembly 'Interop.iTunesLib, Version=1.11.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Now the problem as I see is that the current directory of the program as I get in the report is
"C:\Users\yasd\AppData\Local\Temp\WPDNSE\SID-{10001,SECZ9519043CHOHB,4820242432}"
I was expecting it to be something like
F:\
Because user ran it from the root of the SD card and not on the temporary folder of windows.
and my assessment is that because this path is wrong it could not load dependent assemblies,
Why would something go into temporary directory in C# if ran from SD card ??? I asked the user he did not copy any files out of SD card and ran from SD card.
Please help, any advise highly appreciated.
I have resolved that. The users did not run it from SD card but rather something called Portable devices section which use MTP