Compile .NET 5 Library

Some User

I am learning ASP.NET 5 (vNext). As part of that, I have a reusable library that I am porting over. The library is very basic and does not require any special dependencies. Currently, for this library, I've created my project.json file, which looks like this:

project.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": { }
  }
}

I then have just a basic file that looks like this:

Library.cs

using System;
namespace Test
{
  public class Library
  {
    public static void PrintLine(string line)
    {
      Console.WriteLine(line);
    }
  }
}

I am trying to figure out how to compile my code. I am trying to compile the code from the command line in Mac OS X. How do I compile my code?

Rytmis

The command for compiling DNX projects is

dnu build

You run it in the directory where your project resides.

If you want to create a deployable, reusable NuGet package for other projects to consume, check out:

dnu pack

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Pre-compile razor views in asp .net mvc 5

分類Dev

Compile ffprobe linux library

分類Dev

Howto debug .NET 5 WinForms application that references .NET Framework 4.8 class library in Visual Studio 2019

分類Dev

Can I compile and run a .NET MVC 5 project from Visual Studio Code?

分類Dev

How do I make an XML file an embedded resource in a vNext (ASP.NET 5) class library?

分類Dev

What library needs to be installed for -lz compile flag

分類Dev

Can't compile and link with dynamic library

分類Dev

boost graph library example does not compile

分類Dev

How to compile with X11 library?

分類Dev

c++ program compile with LAPACK library

分類Dev

.NET Geolocation Library

分類Dev

How to compile c++ library to be used in AWS Lambda?

分類Dev

Compile Library for armv7s - cputype (12) and cpusubtype (11)

分類Dev

Is it possible to compile Android library for ARMV6 and optionally with VFP?

分類Dev

How to compile multiple Rust files into a single C library?

分類Dev

How to compile LuaFileSystem library and get .dll file WITHOUT luarocks?

分類Dev

Compile VB.net with Alea GPU programming

分類Dev

Unit testing a .NET Standard 1.6 library

分類Dev

.Net Standard or Portable Class Library moving forward?

分類Dev

Publish .net standard library with all it's dependencies?

分類Dev

Migrating Identity in .net core 2 class library

分類Dev

ASP.NET Page Templates Library

分類Dev

ASP.NET Page Templates Library

分類Dev

How to cross compile a toolchain to an ARMv5 platform?

分類Dev

Class library that can be shared between .NET Framework and .NET Core

分類Dev

Referencing .NET 4.6.2 class library from .NET Core app

分類Dev

Which .Net framework should my .Net Core library target?

分類Dev

Using .NET Core library in .NET 4.5.2 console application

分類Dev

Is EF Core missing anything in .NET Standard vs .NET Core library?

Related 関連記事

  1. 1

    Pre-compile razor views in asp .net mvc 5

  2. 2

    Compile ffprobe linux library

  3. 3

    Howto debug .NET 5 WinForms application that references .NET Framework 4.8 class library in Visual Studio 2019

  4. 4

    Can I compile and run a .NET MVC 5 project from Visual Studio Code?

  5. 5

    How do I make an XML file an embedded resource in a vNext (ASP.NET 5) class library?

  6. 6

    What library needs to be installed for -lz compile flag

  7. 7

    Can't compile and link with dynamic library

  8. 8

    boost graph library example does not compile

  9. 9

    How to compile with X11 library?

  10. 10

    c++ program compile with LAPACK library

  11. 11

    .NET Geolocation Library

  12. 12

    How to compile c++ library to be used in AWS Lambda?

  13. 13

    Compile Library for armv7s - cputype (12) and cpusubtype (11)

  14. 14

    Is it possible to compile Android library for ARMV6 and optionally with VFP?

  15. 15

    How to compile multiple Rust files into a single C library?

  16. 16

    How to compile LuaFileSystem library and get .dll file WITHOUT luarocks?

  17. 17

    Compile VB.net with Alea GPU programming

  18. 18

    Unit testing a .NET Standard 1.6 library

  19. 19

    .Net Standard or Portable Class Library moving forward?

  20. 20

    Publish .net standard library with all it's dependencies?

  21. 21

    Migrating Identity in .net core 2 class library

  22. 22

    ASP.NET Page Templates Library

  23. 23

    ASP.NET Page Templates Library

  24. 24

    How to cross compile a toolchain to an ARMv5 platform?

  25. 25

    Class library that can be shared between .NET Framework and .NET Core

  26. 26

    Referencing .NET 4.6.2 class library from .NET Core app

  27. 27

    Which .Net framework should my .Net Core library target?

  28. 28

    Using .NET Core library in .NET 4.5.2 console application

  29. 29

    Is EF Core missing anything in .NET Standard vs .NET Core library?

ホットタグ

アーカイブ