より良いエンジニアを目指して

1日1つ。良くなる!上手くなる!

AzureDevOpsで「Error MSB3644: The reference assemblies for .NETFramework,Version=v4.6.1 were not found.」

[error]C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1220,5): Error MSB3644: The reference assemblies for .NETFramework,Version=v4.6.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

いまだに.NET Framework4.6.1のプロジェクトがあることが問題なのですが。

以下のようにPipelineのyamlを修正して対応しました。

pool:
  vmImage: 'windows-2019'

stackoverflow.com