CosmosOS / Cosmos

Cosmos is an operating system "construction kit". Build your own OS using managed languages such as C#, VB.NET, and more!
https://www.goCosmos.org
BSD 3-Clause "New" or "Revised" License
2.94k stars 552 forks source link

MSB6006 "IL2CPU.exe" exited with code -2147450730 #3090

Closed lfpu closed 1 month ago

lfpu commented 1 month ago

what's that ?

Error MSB6006 "IL2CPU.exe" exited with code -2147450730. Agnelix Kernel C:\Users(user).nuget\packages\cosmos.build\0.1.0-localbuild20220209054635\build\Cosmos.Build.targets

i use vs2022 and install .net 8.0 image

code:

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

namespace MyfirstOS { public class Kernel : Sys.Kernel {

    protected override void BeforeRun()
    {
        Console.WriteLine("Cosmos booted successfully. Type a line of text to get it echoed back.");
    }

    protected override void Run()
    {
        Console.Write("Input: ");
        var input = Console.ReadLine();
        Console.Write("Text typed: ");
        Console.WriteLine(input);
    }
}

}

output:

生成开始于 0:39... 1>------ 已启动生成: 项目: MyfirstOS, 配置: Debug Any CPU ------ 1>MyfirstOS -> I:\VSProject\MyfirstOS\MyfirstOS\bin\Debug\net6.0\MyfirstOS.dll 1>You must install or update .NET to run this application. 1> 1>App: C:\Users\pulon\AppData\Roaming\Cosmos User Kit\Build\IL2CPU\IL2CPU.exe 1>Architecture: x64 1>Framework: 'Microsoft.NETCore.App', version '6.0.0' (x64) 1>.NET location: C:\Program Files\dotnet\ 1> 1>The following frameworks were found: 1> 8.0.8 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] 1> 1>Learn more: 1>https://aka.ms/dotnet/app-launch-failed 1> 1>To install missing framework, download: 1>https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=6.0.0&arch=x64&rid=win-x64&os=win10 1>C:\Users\pulon.nuget\packages\cosmos.build\0.1.0-localbuild20221121055958\build\Cosmos.Build.targets(190,9): error MSB6006: “IL2CPU.exe”已退出,代码为 -2147450730。 1>IL2CPU task took 00:00:00.0420442 1>已完成生成项目“MyfirstOS.csproj”的操作 - 失败。 ========== 生成: 0 成功,1 失败,0 最新,0 已跳过 ========== ========== 生成 于 0:39 完成,耗时 02.707 秒 ==========

Gabolate commented 1 month ago

you need NET 6.0, cosmos dosen't support 8.0

Szymekk44 commented 1 month ago

"1>To install missing framework, download: 1>https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=6.0.0&arch=x64&rid=win-x64&os=win10"

ghost commented 1 month ago

cosmos does not support dotnet 8, you need dotnet 6 instead

lfpu commented 1 month ago

thanks guys, it's working