hi,
I don’t know if i’m doing something wrong or if i’ve not installed the sdk right. I’ve VS2010
I start a new proyect, choose micro framework from Visual C# and then Console.Application.
The default code is very simple :
using System;
using Microsoft.SPOT;
namespace MFConsoleApplication1
{
public class Program
{
public static void Main()
{
Debug.Print(
Resources.GetString(Resources.StringResources.String1));
}
}
}
the string1 is just the clasic Hello word!. the transport is emulator and device Microsoft Emulator. When i run it (F5), the emulator shows but it exit immediately, on the debug console no “hello wold”, it just shows this text :
Found debugger!
The debugging target runtime is loading the application assemblies and starting execution.
Loading Deployment Assemblies.
Resolving.
The debugging target runtime is loading the application assemblies and starting execution.
Ready.
using System;
using Microsoft.SPOT;
using System.Threading;
namespace MFConsoleApplication1
{
public class Program
{
public static void Main()
{
Debug.Print(
Resources.GetString(Resources.StringResources.String1));
Thread.Sleep(-1);
}
}
}
using System;
using Microsoft.SPOT;
using System.Threading;
namespace MFConsoleApplication1
{
public class Program
{
public static void Main()
{
Debug.Print("Hello Wolrd");
Thread.Sleep(-1);
}
}
}
but all i get is :
Found debugger!
The debugging target runtime is loading the application assemblies and starting execution.
Loading Deployment Assemblies.
Resolving.
The debugging target runtime is loading the application assemblies and starting execution.
Ready.
Hi,
it doesn’t work on emulator. but it works panda ii using this code :
Thread.Sleep(Timeout.Infinite); or
Thread.Sleep(-1); or other Thread.Sleep(…); variation.
this works on emulator…
PS. You can change 5000 to whatever you want… OR you don’t need to use Thread.Sleep … just look “Output window” in VS. you will see "Hello World!"
OR you have problem with your VS installation and other MF installation… i only add Thread.Sleep(-1); to your code and it worked…
best regards,