3

I have two questions: Appreciate any hints or answers.

  1. Build .Net framework app in Linux: I want to build .Net Framework in Linux, is there anyway doing it?

  2. Build using Cloud and download the .exe to the Linux: Is there anyway to build a .net framework app using Azure DevOps and download the executable?

Thanks.

Emily Wong
  • 297
  • 3
  • 10

2 Answers2

1

Build .Net framework app in Linux: I want to build .Net Framework in Linux, is there anyway doing it?

It's not recommended to build .net framework projects in Linux environment, but it's possible. We can use mono with reference assemblies and the dotnet cli to do that.

More details please refer to this blog and the discussion here.

Build using Cloud and download the .exe to the Linux: Is there anyway to build a .net framework app using Azure DevOps and download the executable?

I suggest you can build the .net framework project with Azure Devops build pipeline. You can use the VSTS hosted agent(windows) to build that, using tasks below:

enter image description here

After that, you can deploy the output xx.exe to Linux environment by using FTP Upload task in that build pipeline. (You can also choose to use this task in release pipeline) To do that, I suggest you install the vsftpd extension in your Linux machine.

LoLance
  • 25,666
  • 1
  • 39
  • 73
  • thanks, are you aware of any library that can interact with AzurePipe line and do the things? C# or preferred java library? – Emily Wong Dec 06 '19 at 07:06
  • Maybe you're looking for [client apis](https://learn.microsoft.com/en-us/azure/devops/integrate/concepts/dotnet-client-libraries?view=azure-devops#pattern-for-use)? It's C#... – LoLance Dec 06 '19 at 07:16
  • Thanks, are there any java equivelant too? – Emily Wong Dec 06 '19 at 07:27
  • Hmm, as I know devops client api is not supported to use jave language :-( – LoLance Dec 06 '19 at 07:38
-1

1) .net core framework is a platform independent runtime framework with which you can build apps for windows, macos and linux. You need to set the appropriate Target runtime when you create the build. Also know that .net core apps can be run as framework dependent (.net core installed in the machine) or self contained.( where the core framework gets packaged together)

reference- Get started with .NET Core

2) Yes Azure devops build and release pipelines support .net core apps. First you need to configure the code repository from which the build engine will fetch the code, then you specify the runtime and in the pipelines you can specify what is your target deployment be it app service, VM and so on.

https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/dotnet-core?view=azure-devops

Aravind
  • 4,125
  • 1
  • 28
  • 39
  • I know all this about .net core, I am only talking about .net framework here. – Emily Wong Nov 23 '19 at 17:34
  • @EmilyWong ok. .net core is the .net framework for linux. or you should look at https://www.mono-project.com/ for an open source .net for linux. given that with .net 5.0 core will be the .net framework you should be looking at .net core for linux development. – Aravind Nov 23 '19 at 17:58
  • I am not going to execute the program in Linux, I only want to build it there. the execution will happen in Windows with .net framework installed. – Emily Wong Nov 23 '19 at 19:07