namespace CosmosKernel2
{
public class Kernel : Sys.Kernel
{
protected override void BeforeRun()
{
Console.WriteLine("hi.");
}
protected override void Run()
{
Console.WriteLine("Input:");
String input = Console.ReadLine();
if (input.StartsWith("echo"))
{
var index = input.LastIndexOf(input); // ERROR HERE
Console.WriteLine("echo: " + input.Substring(cmdLastIndex));
}}}}
I am making a simple OS to echo user's input. However, I am getting some errors. I see nothing wrong with creating a var index and storing the last index.
Here is my error:
Build started: Project: CosmosKernel2Boot, Configuration: Debug x86 ------
1> Invoking il2cpu.exe "DebugEnabled:True" "StackCorruptionDetectionEnabled:False" "DebugMode:Source" "TraceAssemblies:" "DebugCom:1" "UseNAsm:True" "OutputFilename:C:\Users\Lindsay\Documents\Visual Studio 2015\Projects\CosmosKernel2\CosmosKernel2\bin\Debug\CosmosKernel2Boot.asm" "EnableLogging:True" "EmitDebugSymbols:True" "IgnoreDebugStubAttribute:False" "References:C:\Users\Lindsay\Downloads\Cosmos User Kit\Kernel\Cosmos.Core.Plugs.dll" "References:C:\Users\Lindsay\Downloads\Cosmos User Kit\Kernel\Cosmos.Debug.Kernel.Plugs.dll" "References:C:\Users\Lindsay\Downloads\Cosmos User Kit\Kernel\Cosmos.System.Plugs.dll" "References:C:\Users\Lindsay\Documents\Visual Studio 2015\Projects\CosmosKernel2\CosmosKernel2\bin\Debug\CosmosKernel2.dll" "References:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll"
1>C:\Program Files (x86)\MSBuild\Cosmos\Cosmos.targets(31,5): error : Error occurred while invoking IL2CPU.
1> Executing command line "C:\Users\Lindsay\Downloads\Cosmos User Kit\Build\IL2CPU\IL2CPU.exe" "DebugEnabled:True" "StackCorruptionDetectionEnabled:False" "DebugMode:Source" "TraceAssemblies:" "DebugCom:1" "UseNAsm:True" "OutputFilename:C:\Users\Lindsay\Documents\Visual Studio 2015\Projects\CosmosKernel2\CosmosKernel2\bin\Debug\CosmosKernel2Boot.asm" "EnableLogging:True" "EmitDebugSymbols:True" "IgnoreDebugStubAttribute:False" "References:C:\Users\Lindsay\Downloads\Cosmos User Kit\Kernel\Cosmos.Core.Plugs.dll" "References:C:\Users\Lindsay\Downloads\Cosmos User Kit\Kernel\Cosmos.Debug.Kernel.Plugs.dll" "References:C:\Users\Lindsay\Downloads\Cosmos User Kit\Kernel\Cosmos.System.Plugs.dll" "References:C:\Users\Lindsay\Documents\Visual Studio 2015\Projects\CosmosKernel2\CosmosKernel2\bin\Debug\CosmosKernel2.dll" "References:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll"
1> Working directory = 'C:\Users\Lindsay\Documents\Visual Studio 2015\Projects\CosmosKernel2\CosmosKernel2\bin\Debug\'