none
.net framework on Galileo V2 RRS feed

  • Question

  • First, if this is the wrong forum for this question, my apologies, please point to me to right place, otherwise....

    I'm using the following OS on my Galileo Gen 2:

    9600.16384.x86fre.winblue_rtm_iotbuild.150309-0310_galileo_v2

    While looking around, I found a directory containing a .NET framework in C:\windows\system32\CoreCLR\v1.0.   I read somewhere that this is similar to the .net framework running on Windows Phone.

    Is this correct?

    Exactly what version is this?

    Using VS 2013, I created a very simple console test application (main source is below).  I started with 4.52 and worked my way down to version 4 of the .NET framework, thinking the problem might be a version conflict.  The app crashes, when the RunInThread is invoked.  I thought threading might be an issue, so I removed the thread stuff and called it directly, the error is fairly similar, thread or no thread, both throw the same "Could not load file or assembly 'System.Core, Version=4.0.0.0, Culture=neutral" exception

    In addition to the questions above:

    1)  Should I be able to run a .NET app on the Galileo?

    2)  If so,  are there .NET APIs, specifically for the Galileo 2?

    3) If so, is there any documentation on the subject?

    4) If not, what is the purpose of the CoreCLR folder?

    5) Any other information on running a .NET app on the Galileo is welcome.

    public class TestClass
        {
            bool processing = false;
            Thread runIt;

            public bool Processing
            {
                get { return processing; }
            }
            public void Start()
            {
               
                Console.WriteLine("Startup");
                processing = true;
                //runIt = new Thread(new ThreadStart(RunInThread));
                //runIt.IsBackground = true;
                //runIt.Start();
                RunInThread();
                Console.WriteLine("Started Thread");
            }

            private void RunInThread()
            {
                int i = 0;
                string name = string.Empty;
                Console.WriteLine("Entered RunInThread");
                List<string> names = new List<string>();
                names.Add("Item 0");
                names.Add("Item 1");
                names.Add("Item 2");
                names.Add("Item 3");
                names.Add("Item 4");
                while (i < 5)
                {
                    name = names.Where(x => x == ("Item" + i.ToString())).FirstOrDefault();
                    Console.WriteLine("Name: " + name + " Iter.: " + i.ToString());
                    i++;
                    Thread.Sleep(1000);
                }
                processing = false;
            }
        }

    Unhandled Exception: System.Reflection.TargetInvocationException: Exception has

    been thrown by the target of an invocation. ---> System.IO.FileNotFoundException

    : Could not load file or assembly 'System.Core, Version=4.0.0.0, Culture=neutral

    , PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot

    find the file specified.

       at CSharpTest.TestClass.RunForAwhile()

       at CSharpTest.TestClass.Start()

       at CSharpTest.Program.Main(String[] args)

       --- End of inner exception stack trace ---

       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments,

    Signature sig, Boolean constructor)

       at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Objec

    t[] parameters, Object[] arguments)

       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke

    Attr, Binder binder, Object[] parameters, CultureInfo culture)

       at AppDomainManager.HostMain(Int32 argc, Char** argv, Char* assemblyToRun, In

    t32 flags)

    Wednesday, March 25, 2015 1:27 AM

Answers

  • Officially, .net is not supported on the Galileo platform and there is no documentation on what is included what not. I've done some research into it, and it's missing a lot of stuff... apparently it is based on the WP OS image, but even for that, it's missing stuff.

    So yeah, there is no official support for .net yet, don't expect a precise answer.

    Wednesday, March 25, 2015 8:43 AM

All replies

  • Officially, .net is not supported on the Galileo platform and there is no documentation on what is included what not. I've done some research into it, and it's missing a lot of stuff... apparently it is based on the WP OS image, but even for that, it's missing stuff.

    So yeah, there is no official support for .net yet, don't expect a precise answer.

    Wednesday, March 25, 2015 8:43 AM
  • Thanks for the reply.  The errors I'm getting, reference missing DLLs, I added the CoreCLR\v1.0 to the path but that didn't help.  I missed it the first time but when I looked at the files again, I noticed they had added ".ni" to most of them.  e.g. System.IO.FileSystem.ni.dll.  I'm experimenting with renaming the files to what they should be, i.e. System.IO.FileSystem.dll.   I'm also going to try copying missing files from the .net folder of a Windows RT tablet I have.   I'm really curious, to see if I can make this work.   Of course, the problem is, even if I do get it working, APIs to interact with the hardware.  I see no reference to anything like the SPOT library, included with NETMF, so who knows.


    • Edited by Cicero564 Wednesday, March 25, 2015 5:02 PM
    Wednesday, March 25, 2015 5:01 PM
  • This question was addressed in a previous post in this forum. Please take a look at https://social.msdn.microsoft.com/Forums/en-US/1175b5f2-19f4-45cf-af90-4c0188fc35f5/galileo-2-and-net?forum=HardwareBoards
    Wednesday, March 25, 2015 8:39 PM
    Moderator
  • I don't think you'll be able to simply copy/paste missing .dll files from a Windows RT tablet... x86 vs. ARM etc. etc... I'm trying to approach it from a different angle, hopefully I'll catch time this weekend to try out some stuff. Will start a discussion here if I find anything remotely interesting :)
    Wednesday, March 25, 2015 9:12 PM
  • Agreed. You will not be able to just port files from an RT Tablet but you can try the Mono On Galileo implementation that is mentioned in the other thread.
    Wednesday, March 25, 2015 9:20 PM
    Moderator
  • Yeah, I guess not.   I wonder what differentiates a .net assembly built for arm vs. x86 vs. etc., since it's not native code.   I would understand 64 vs. 32 bit but oh well.  I'm still going pursue this as well, please post anything you might find, I'm interested.

    Thanks

    Wednesday, March 25, 2015 10:27 PM
  • Tuesday, April 7, 2015 7:38 PM
    Moderator