Help required with Update firmware to 4.1.1
#21
Posted 09 February 2011 - 11:07 AM
#22
Posted 09 February 2011 - 02:01 PM
#23
Posted 09 February 2011 - 03:51 PM
I have just uploaded vs express onto another pc (atom)
Ran the code on atom pc and got the same results as my normal pc see attachment earlier.
Alan
#24
Posted 11 February 2011 - 05:06 PM
#25
Posted 12 February 2011 - 01:27 PM
Directory.SetCurrentDirectory("\\SD");
To
Directory.SetCurrentDirectory(@"\SD");When I did this it all worked fine.
Which is the embarrassed emoticon, imagine it here
#26
Posted 12 February 2011 - 06:24 PM
How odd - all the @ should do is to remove the need for the escape sequence. @"\SD" and "\\SD" should be the same.It was pointed out to me that I should change
Directory.SetCurrentDirectory("\\SD");
To
Directory.SetCurrentDirectory(@"\SD");
Could you expand on the reasoning for the change.
Regards,
Mark
To be or not to be = 0xFF
Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life
Follow @nevynuk on Twitter
#27
Posted 12 February 2011 - 10:22 PM
#28
Posted 13 February 2011 - 04:41 PM
I'd like you to try this program:
using System; using System.IO; using Microsoft.SPOT; namespace NetduinoApplication17 { public class Program { public static void Main() { var rootsToTry=new[] { @"\", "\\", @"\\\\\CHRIS\\\WALKER\\??!%??\\\37337" //add other options you want to try here }; foreach(var root in rootsToTry) { try { var dirs=Directory.GetDirectories(root); Debug.Print(root+" has "+dirs.Length+" directories. They are:"); foreach(var dir in dirs) { Debug.Print("==> "+dir); } } catch(Exception e) { Debug.Print(root+" caused this exception: "+e.Message); } } } } }
On my Netduino Plus (firmware (v4.1.1.0 a6)) I get this output:
\ has 1 directories. They are: ==> \SD \ has 1 directories. They are: ==> \SD #### Exception System.ArgumentException - 0x00000000 (1) #### #### Message: #### System.IO.Path::NormalizePath [IP: 003f] #### #### System.IO.Path::GetFullPath [IP: 001a] #### #### System.IO.Directory::GetChildren [IP: 0004] #### #### System.IO.Directory::GetDirectories [IP: 0008] #### #### NetduinoApplication17.Program::Main [IP: 0035] #### A first chance exception of type 'System.ArgumentException' occurred in System.IO.dll \\\\\CHRIS\\\WALKER\\??!%??\\\37337 caused this exception: Exception was thrown: System.ArgumentException
#29
Posted 14 February 2011 - 06:20 PM
Attached Files
#30
Posted 14 February 2011 - 06:24 PM
Now I am really embarrased as I have finally found out what was going wrong.
Ahahahahahah! Well, sh*t happens. Glad you figured it out!
#31
Posted 15 February 2011 - 12:08 AM
It seems that in the program that ran and gave me errors I had somehow inadvertantly switched the .Net Micro Framework Deployment Transport option to Emulator!!!
How funny. Yes, that does explain why you were getting the odd pathnames.
Glad that everything is working for you now...
Chris
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users