Posts

Showing posts with the label .net-standard

Building .netstandard library on linux using command line options

Building .netstandard library on linux using command line options How to build a project targeted to netstandard on linux using command line options. Can MSBUILD/csc be used to build the files on linux. I had googled and found that .NET Core sdk provides "dotnet" tool to compile the code. But to compile a code which has to be targeted to "netstandard" what command line tool has to be used which comes along the sdk. 1 Answer 1 The information on the target framework can simply be indicated in the .csproj file. .csproj Then you execute dotnet publish or dotnet build to generate binaries. dotnet publish dotnet build For instance, here is a MyProject.csproj example of a project that has several target framework for .NET standard : MyProject.csproj <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>netstandard2.0;netstandard1.6;ne...