0

我已经完成了 COSMOS 官方网站告诉我添加的所有内容;所有参考资料,cosmos.common 等。它要求我添加:

using Cosmos.Common;
[assembly: Ring(Ring.System)]

所以当然我把它们分成两部分,使用部分和其他部分,以及程序集中的程序集。我当前的 AssemblyInfo.cs 代码:

using System;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Cosmos.Common.Extensions;
using Cosmos.Common;
using Cosmos.Core;
using Cosmos.Debug;
using Cosmos.System;
using Cosmos.Common.Extensions;
using Cosmos.Hardware.BlockDevice;
using Cosmos.Hardware.Drivers.PCI.Network;




// General Information about an assembly is controlled through the following 
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: Ring(Ring.Hardware)] 
// This ^^^ is broken, has a red line under the first "ring" 
// "The type or namespace name 'Ring' could not be found. (Are you missing a using directive or assembly reference?)
[assembly: AssemblyTitle("Package Name")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Company")]
[assembly: AssemblyProduct("Package Name")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: CLSCompliant(false)]
[assembly: NeutralResourcesLanguage("en-US")]

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version 
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Revision and Build Numbers 
// by using the '*' as shown below:

[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
4

2 回答 2

0

我也遇到了这个错误。在 COSMOS 官方教程中说我们要在 COSMOS User Kit 的 Kernel 目录中添加所有 dll 作为参考。右键单击硬件项目中的引用,然后单击添加引用。然后单击浏览并转到 C:/Program Files/Cosmos User Kit/Kernel/ 然后选择所有 dll 并添加到引用它会解决您的问题。

于 2016-04-08T09:18:58.850 回答
0

如果您的内核脚本在同一个项目或解决方案中,任何调用系统或硬件环的尝试都将在 il2cpu 编译器启动时被阻止。

于 2018-09-04T09:39:19.987 回答