Warnings of no reason

Topics: Using Cosmos (Developing your own OS, projects, etc)
Oct 31, 2014 at 12:01 AM
Edited Oct 31, 2014 at 12:02 AM
Warning 4
There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Cosmos.System, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983, processorArchitecture=MSIL", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.


Find this error quite special, searched for it on Google and found that it can appear when you use Thread.Sleep and when the Warning first appeared I had used Thread.Sleep but now when i have removed it I can not get rid of the warnings...
I have even tried to comment ALL of my code (even the using.) but i will not disappear.

This is my code

using System;
using System.Collections.Generic;
using System.Text;
using Sys = Cosmos.System;
using Cosmos.Core;
using Cosmos.Hardware.Drivers.PCI.Video;
using Cosmos.Debug.Kernel;
using System.Drawing;
using System.Diagnostics;
namespace Gymnasiearbete
{
    public class Kernel : Sys.Kernel
    {
        //Kod som bara körs en gång och det när programmet startar
        protected override void BeforeRun()
        {
            //Variabel
           ushort width = 600;
           ushort height = 400;
            //Skapar min VGA driver, själva skärmen 
            VMWareSVGAII vgaDriver = new VMWareSVGAII();
            vgaDriver.SetMode(width, height);
            //Skapar min bakrundsbild (svart)
            //new skrivbord(width, height, vgaDriver);
            //Skapar ett intro
            //new intro(width, height, vgaDriver);
            //Skapar en skrivbordsikon
            //new ikon(width, height, vgaDriver);
        }
        //Kod som kommer köras hela tiden 
        protected override void Run()
        {
        }
    }
}
Ignore the comments, but as you can see, I am not using some sort of disallowed code(?)
Oct 31, 2014 at 12:10 AM
Yes I do now that, but I also found a comment saying warnings will be a problem if I export the project to a bootable file?
Coordinator
Oct 31, 2014 at 8:55 AM
This error usually warns you for mismatching assembly platforms.
Having 2 assemblies, A and B, where A references B, will give this warning when A is set to AnyCPU and B to x86. .NET runtime can then start A in 64-bit mode, crashing the application, because B isn't available for 64-bit.

For cosmos, however, everything's ok, becuase (for now), we only have 32 bit..

Most of the times, warnings point you to potential future code issues....
Marked as answer by Ghoosteer on 10/31/2014 at 3:05 AM
Oct 31, 2014 at 10:06 AM
mterwoord wrote:
This error usually warns you for mismatching assembly platforms.
Having 2 assemblies, A and B, where A references B, will give this warning when A is set to AnyCPU and B to x86. .NET runtime can then start A in 64-bit mode, crashing the application, because B isn't available for 64-bit.

For cosmos, however, everything's ok, becuase (for now), we only have 32 bit..

Most of the times, warnings point you to potential future code issues....
Thanks! This is my first time with Cosmos and have only had like 200h with C# so you may see me with some more stupid questions later ;)


Best Regards!