I am trying to deploy specific changeset using the SourceVersion variable in the Azure pipeline with no luck. Every time it is anything other than latest build task fails with below error, but works perfectly fine for latest code (no value for SourceVersion):
[error]C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\NuGet\16.0\Microsoft.NuGet.targets(186,5):
Error : Your project does not reference ".NETFramework,Version=v4.6.1" framework. Add a reference to ".NETFramework,Version=v4.6.1" in the "TargetFrameworks" property of your project file and then re-run NuGet restore.
I am not sure where to even check for the issue. Really appreciate any input.
Thanks!!