This project is read-only.

Last edited May 8, 2015 at 9:06 PM by armmaster17, version 4

Comments

xSlendiX Oct 4 at 9:00 AM 
I get this error:
Error 6 Native code encountered, plug required. Please see http://cosmos.codeplex.com/wikipage?title=Plugs). System.Void System.Decimal.FCallAddSub(&System.Decimal, &System.Decimal, System.Byte).
Called from :
System.Decimal System.Decimal.op_Addition(System.Decimal, System.Decimal)
System.Void OS_TEST.Kernel.Run()
System.Void Cosmos.System.Kernel.Run()

at Cosmos.IL2CPU.ILScanner.ScanMethod(MethodBase aMethod, Boolean aIsPlug, String sourceItem) in g:\IL2CPU\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:line 541
at Cosmos.IL2CPU.ILScanner.ScanQueue() in g:\IL2CPU\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:line 686
at Cosmos.IL2CPU.ILScanner.Execute(MethodBase aStartMethod) in g:\IL2CPU\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:line 277
at Cosmos.Build.MSBuild.IL2CPUTask.Execute() in g:\IL2CPU\source2\Build\Cosmos.Build.MSBuild\IL2CPUTask.cs:line 239 C:\Program Files (x86)\MSBuild\Cosmos\Cosmos.targets 31 6 OS TESTBoot

Code:
using System;
using System.Collections.Generic;
using System.Text;
using Sys = Cosmos.System;

namespace OS_TEST
{
public class Kernel : Sys.Kernel
{
protected override void BeforeRun()
{
Console.Write("--------------\nMS-TUU Ver 1.0\nMade by TheUnipadyUnipader with the Cosmos kernel.");
}

protected override void Run()
{
Console.Write("Input: ");
var input = Console.ReadLine();
if (input == "calc")
{
decimal val1;
string sign;
decimal val2;

Console.WriteLine("Enter operator(add, sub, de, mod");
sign = Console.ReadLine();
Console.WriteLine("Enter value for Number 1");
val1 = Convert.ToDecimal(Console.ReadLine());
Console.WriteLine("Enter value for Number 2");
val2 = Convert.ToDecimal(Console.ReadLine());
if(sign == "add") //Line 31
{
Console.WriteLine("Result: ");
Console.Write(val1 + val2);

}
else if(sign == "sub")
{
Console.WriteLine("Result: ");
Console.Write(val1 - val2);

}
else if(sign == "de")
{
Console.WriteLine("Result: ");
Console.Write(val1 / val2);

}
else if(sign == "mod")
{
Console.WriteLine("Result: ");
Console.Write(val1 % val2);

}
else
{
Console.WriteLine("Invalid Operator");

}

}
}
}
}

Bonnedav Jul 14, 2014 at 9:23 AM 
When I try to add more than 5 cases to a switch I get this error:
"C:\Program Files (x86)\MSBuild\Cosmos\Cosmos.targets(31,5): error : Native code encountered, plug required. Please see http://cosmos.codeplex.com/wikipage?title=Plugs). System.Object System.RuntimeTypeHandle.CreateInstanceForAnotherGenericParameter(System.RuntimeType, System.RuntimeType).
2> Called from :
2>System.Collections.Generic.EqualityComparer`1<><System.String> System.Collections.Generic.EqualityComparer`1<><System.String>.CreateComparer()
2>System.Collections.Generic.EqualityComparer`1<><System.String> System.Collections.Generic.EqualityComparer`1<><System.String>.get_Default()
2>System.Void System.Collections.Generic.Dictionary`2<, ><System.String, System.Int32>..ctor(System.Int32, System.Collections.Generic.IEqualityComparer`1<><System.String>)
2>System.Void System.Collections.Generic.Dictionary`2<, ><System.String, System.Int32>..ctor(System.Int32)
2>System.Void DavidOS.Commands.Engine()
2>System.Void DavidOS.Kernel.Run()
2>System.Void Cosmos.System.Kernel.Run()".

DatFuuzy May 11, 2014 at 8:32 PM 
Getting an error at this code :
using System;
using System.Collections.Generic;
using System.Text;
using Sys = Cosmos.System;

namespace BlurOS
{
public class Kernel : Sys.Kernel
{
protected override void BeforeRun()
{
Console.WriteLine("BLUR OS BOOTED FROM CD");
}

protected override void Run()
{
for (; ; )
{
int input;
Console.BackgroundColor = ConsoleColor.Gray;
Console.WriteLine("Type 1 for commands");
input = Convert.ToInt32(Console.ReadLine());
if (input == 2)
{
Console.Write("Input: ");
var input2 = Console.ReadLine();
Console.Write("Text typed: ");
Console.WriteLine(input);
}
else if (input == 1)
{
Console.WriteLine("1 - Gets you here");
Console.WriteLine("2 - Echo Command (Can't get back :) )");
Console.WriteLine("3 - Clears screen of crap");
}
else if (input == 3)
{
Console.Clear();
}
else
{
Console.WriteLine("Command does not exist. Try 1");
}
}
}
}
}

And the error :

Error 6 Native code encountered, plug required. Please see http://cosmos.codeplex.com/wikipage?title=Plugs). System.String System.Number.FormatDecimal(System.Decimal, System.String, System.Globalization.NumberFormatInfo).
Called from :
System.String System.Decimal.ToString()
System.Decimal

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 BlurOSBoot

Niels1997 Sep 16, 2013 at 7:28 PM 
When i try to use this code:

Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Cosmos.Hardware.BlockDevice
Imports Cosmos.Core
Imports Cosmos.Debug
Imports Cosmos.Hardware

Namespace LoL_OS

Public Class Kernel
Inherits Cosmos.System.Kernel

Protected Overrides Sub BeforeRun()
Dim mem = Cosmos.Core.CPU.GetAmountOfRAM
If mem > (512 * 1024) Then
Console.ForegroundColor = ConsoleColor.Green
Console.WriteLine("Memory block is acceptable!")
Console.ForegroundColor = ConsoleColor.Gray
Else
Console.ForegroundColor = ConsoleColor.Red
Console.WriteLine("You need to replace the memory!")
Console.ForegroundColor = ConsoleColor.Gray
Cosmos.Core.Bootstrap.CPU.Halt()
End If
End Sub

Protected Overrides Sub Run()
Console.WriteLine("Loading all available disk partitions...")
For Each blk As BlockDevice In BlockDevice.Devices
Console.WriteLine((blk.BlockSize * blk.BlockCount) & "B")
Next
End Sub

End Class

End Namespace

I get this error when i debug it

Error 8 Native code encountered, plug required. Please see http://cosmos.codeplex.com/wikipage?title=Plugs). System.Boolean Microsoft.Win32.Win32Native.SetEndOfFile(Microsoft.Win32.SafeHandles.SafeFileHandle).
Called from :
System.Void System.IO.FileStream.SetLengthCore(System.Int64)
System.IO.FileStreamAsyncResult System.IO.FileStream.BeginWriteCore(System.Byte[], System.Int32, System.Int32, System.AsyncCallback, System.Object)
System.Void System.IO.FileStream.FlushWrite(System.Boolean)
System.Void System.IO.FileStream.Dispose(System.Boolean)
System.Void System.IO.Stream.Dispose(System.Boolean)

at Cosmos.IL2CPU.ILScanner.ScanMethod(MethodBase aMethod, Boolean aIsPlug, Object sourceItem) in c:\Source\Cosmos\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:line 560
at Cosmos.IL2CPU.ILScanner.ScanQueue() in c:\Source\Cosmos\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:line 678
at Cosmos.IL2CPU.ILScanner.Execute(MethodBase aStartMethod) in c:\Source\Cosmos\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:line 292
at Cosmos.Build.MSBuild.IL2CPUTask.Execute() in c:\Source\Cosmos\source2\Build\Cosmos.Build.MSBuild\IL2CPUTask.cs:line 201 C:\Program Files (x86)\MSBuild\Cosmos\Cosmos.targets 31 6 LoL OSBoot

sanjeevspr Jul 31, 2013 at 11:17 PM 
when i add windown form its generate plugs error ,pls tell me how can i fixed it

lweb20 Aug 25, 2012 at 6:37 AM 
C:\Archivos de programa\MSBuild\Cosmos\Cosmos.targets(32,9): error : Native code encountered, plug required. Please see http://cosmos.codeplex.com/wikipage?title=Plugs). System.String System.Number.FormatDecimal(System.Decimal, System.String, System.Globalization.NumberFormatInfo).
Called from :
System.String System.Decimal.ToString()
System.Decimal

en Cosmos.IL2CPU.ILScanner.ScanMethod(MethodBase aMethod, Boolean aIsPlug, Object sourceItem) en D:\source\Cosmos\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:línea 821
en Cosmos.IL2CPU.ILScanner.ScanQueue() en D:\source\Cosmos\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:línea 970
en Cosmos.IL2CPU.ILScanner.Execute(MethodBase aStartMethod) en D:\source\Cosmos\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:línea 322
en Cosmos.Build.MSBuild.IL2CPUTask.Execute() en d:\source\Cosmos\source2\Build\Cosmos.Build.MSBuild\IL2CPUTask.cs:línea 231