English
Français

Blog of Denis VOITURON

for a better .NET world

Azure DevOps - Compile with .NETCore 3

Posted on 2019-09-27

Since few days Microsoft released the final version of .NETCore 3.0.

How to develop with .NET Core 3.0

To use this version, configure your csproj to define the TargetFramework and the parameters of publication : a single file for Win10-x64.

<PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.0</TargetFramework>
    <RuntimeIdentifier>win10-x64</RuntimeIdentifier>
    <PublishSingleFile>true</PublishSingleFile>
    <PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>

You can publish your project in a single big executable, via the Visual Studio command Publish (right-click on the project).

Azure DevOps

To my great surprise, I didn’t find this version in the SDKs installed by default in the Azure DevOps Pipelines. The reason and the solution is quite simple: simply add a task to install the SDK of your choice.

In your Build Definition, search for the use .net core task and configure it as follows:

Install DotNetCore

Languages

EnglishEnglish
FrenchFrançais

Follow me

Recent posts