Thursday, January 30, 2020

The project was restored using Microsoft.NETCore.App version X, but with current settings, version Y would be used instead

When I came across this error in devops build pipelines, I initially though that there must have been some uninted change done by visual studio to project file which causes this error. However after checking diff it was clear that there were absolutely no changes in the two commits apart from whitespaces.

Thus reason for this error became a suspense until I stumbled across this post

https://gert-cominotto.be/2019/02/18/azure-devops-functions-build-fails-the-project-was-restored-using-microsoft-netcore-app-version-1-0-0-but-with-current-settings-version-2-1-6-would-be-used-instead/

It basically says that the error is caused by Nuget Restore task in Azure pipeline which always uses dot net core 1.0.0.

And the solution is to use dotnet restore task instead of Nuget restore task.


No comments:

SSL Error - The connection for this site is not secure

 After cloning a git repo of dot net framework website and trying to run it all I could see was this error Turns out the fix was to simply e...