The .NET Framework version 4.8.1 was released in August of this year. When will it be supported in Azure Web Apps?
I upgraded a solution with multiple projects targeting v4.8.1. Building on my local machine is fine - no errors; however, when I attempted a build via a pipeline in ADO, I get the error:
##[error]C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1217,5): Error MSB3644: The reference assemblies for .NETFramework,Version=v4.8.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
Perhaps it's a setting I'm overlooking?
CodePudding user response:
The .NET Framework 4.8.1 is already installed in Microsoft-hosted agent windows-latest
OR windows-2022
. It is documented here.
So, if you are using Microsoft-hosted agent windows-2019
, please try to use windows-latest
OR windows-2022
instead.
Besides, another solution is to use self-hosted agent. This will set your local machine as an agent, so that all the software you are using in the pipeline come from your local machine.
Update:
Please try to add a NuGet Tool Installer task at the beginning of your pipeline. Here is an exmaple:
- task: NuGetToolInstaller@1
inputs:
versionSpec: '5.8.0'
This task can find, download, and cache a specified version of NuGet and add it to the PATH.