我正在学习 ASP.NET 5 (vNext)。作为其中的一部分,我有一个要移植的可重用库。该库非常基础,不需要任何特殊依赖项。目前,对于这个库,我已经创建了我的 project.json 文件,如下所示:
项目.json
{
"version": "1.0.0-*",
"compilationOptions": {
"warningsAsErrors": true
},
"dependencies": {
"Microsoft.Framework.ConfigurationModel": "1.0.0-*",
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-*"
},
"frameworks": {
"dnx451": { },
"dnxcore50": { }
}
}
然后我只有一个看起来像这样的基本文件:
图书馆.cs
using System;
namespace Test
{
public class Library
{
public static void PrintLine(string line)
{
Console.WriteLine(line);
}
}
}
我想弄清楚如何编译我的代码。我正在尝试从 Mac OS X 中的命令行编译代码。如何编译我的代码?