Home > other >  Is it possible to Build & Publish a DotNet3.1 function app on DotNet6.0
Is it possible to Build & Publish a DotNet3.1 function app on DotNet6.0

Time:01-03

I'm building and publishing a function app written in.Net6.0 using a DotNet6.0 docker image and a GitLab-CI pipeline. Will the same DotNet6.0 image support building & publishing similar/same function app developed in DotNet3.1 .

Please let me know whether any ways are there to make the Build & Publish of DotNet3.1 function-app with a DOtNet6.0, to make the pipeline backward compatible.

CodePudding user response:

It is generally not possible to build and publish a .NET 3.1 function app using a .NET 6.0 Docker image, as the versions of the .NET runtime and associated libraries are not compatible. You would need to use a .NET 3.1 Docker image or a version of the .NET runtime that is compatible with .NET 3.1 in order to build and publish your function app.

One way to make your GitLab-CI pipeline backward compatible would be to create multiple pipeline definitions, one for .NET 6.0 and one for .NET 3.1. You could then specify the appropriate pipeline to use based on the version of .NET that your function app is built with. Alternatively, you could create a single pipeline definition that is capable of building and publishing function apps built with either .NET 3.1 or .NET 6.0 by including the necessary steps and dependencies for both runtime versions.

  • Related