What is the best practice for building a .sln file in Azure DevOps Pipelines that has both projects targeting .NET Core and .NET Framework?
I have tried to use the NuGet restore task on the .sln file, but it errors on some packages that are not compatible in .NET Core 2.1. It also states this in the description of the task when it is running a build:
Restore, pack, or push NuGet packages, or run a NuGet command. It supports NuGet.org and authenticated feeds like Azure Artifacts and MyGet. It uses NuGet.exe and works with .NET Framework applications. For .NET Core and .NET Standard applications, use the .NET Core task.
If I use a .NET Core task I can only do a dotnet restore
and dotnet build
on specific .csproj files, but not the whole .sln file like I can with the Visual Studio Build task.
What is the best practice on how to build a .sln file in Azure DevOps that has both .NET Core and .NET Framework projects and also needs to restore packages?