none
COSMOS C# saying it needs a required plug for a certain piece of code.

    Question

  • I am trying to build a COSMOS C# system using Visual Studio 2013. I made some code for the system, but it pops up with an error saying it needs a required plug: 

    Error 6 Native code encountered, plug required. Please see http://cosmos.codeplex.com/wikipage?title=Plugs). System.Void  System.Buffer.__Memcpy(System.Byte*, System.Byte*, System.Int32).
     Called from :
    System.Void  System.Buffer._Memcpy(System.Byte*, System.Byte*, System.Int32)
    System.Void  System.Buffer.Memcpy(System.Byte*, System.Byte*, System.Int32)
    System.Void  System.String.wstrcpy(System.Char*, System.Char*, System.Int32)
    System.String  System.String.InternalSubString(System.Int32, System.Int32)
    System.String  System.String.CreateTrimmedString(System.Int32, System.Int32)
    System.String  System.String.TrimHelper(System.Int32)
    System.String  System.String.Trim()
    System.Void  CosmosKernel4.Kernel.Run()
    System.Void  Cosmos.System.Kernel.Run()

       at Cosmos.IL2CPU.ILScanner.ScanMethod(MethodBase aMethod, Boolean aIsPlug, Object sourceItem) in g:\Coding\C#\Cosmos\Cosmos-Devkit\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:line 560
       at Cosmos.IL2CPU.ILScanner.ScanQueue() in g:\Coding\C#\Cosmos\Cosmos-Devkit\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:line 678
       at Cosmos.IL2CPU.ILScanner.Execute(MethodBase aStartMethod) in g:\Coding\C#\Cosmos\Cosmos-Devkit\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:line 292
       at Cosmos.Build.MSBuild.IL2CPUTask.Execute() in g:\Coding\C#\Cosmos\Cosmos-Devkit\source2\Build\Cosmos.Build.MSBuild\IL2CPUTask.cs:line 201 C:\Program Files (x86)\MSBuild\Cosmos\Cosmos.targets 31 6 CosmosKernel4Boot

    Does anyone know how to help? I am still a bit new to C#.

    Thanks,

    Rhys

    Wednesday, May 28, 2014 9:53 AM

All replies

  • Did yo utry going to the webpage http://cosmos.codeplex.com

    jdweng

    Wednesday, May 28, 2014 10:30 AM
  • Yes, but nothing is mentioned on how to fix it. I was wondering if anyone could offer a bit of help.
    Wednesday, May 28, 2014 1:34 PM
  • I asumed you installed the download. Did it install properly?  Are you starting using the

    Start menu link called Visual Studio 2013


    jdweng

    Wednesday, May 28, 2014 2:05 PM
  • No, I use the desktop shortcut. I have Ultimate installed.

    Edit: The code is 

    Console.WriteLine("Sys:");
    
    string command = Console.ReadLine();
    while (command.Trim() != "")
    {
        switch (command.Trim().ToLower())
        {
            case "help" :
                Console.WriteLine("Command1");
                Console.WriteLine("Command2");
                Console.WriteLine("Command3");
                break;
            case "something else etc." :
                Console.WriteLine("Other Stuff");
                break;
            default :
                Console.WriteLine("Invalid Entry!!");
                break;
        }
    
        command = Console.ReadLine();
    }

    • Edited by RhysRahPC Wednesday, May 28, 2014 2:47 PM Added code
    Wednesday, May 28, 2014 2:10 PM