When I use the latest setup-dotnet, I get an 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 the .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
I tried both setup-dotnet but it says version 4.6.1 has been deprecated.
.NET Framework 4.6.1 support is removed in
windows-latest, which you're most likely using. You can either:runs-on: windows-2019