Getting error while running build task in VSTS devops.

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets(477,5): Error MSB4062: The "SqlModelResolutionTask" task could not be loaded from the assembly \Extensions\Microsoft\SQLDB\Dac\150\Microsoft.Data.Tools.Schema.Tasks.Sql.dll. Could not load file or assembly 'file:///C:\Extensions\Microsoft\SQLDB\Dac\150\Microsoft.Data.Tools.Schema.Tasks.Sql.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

1 Answers

Leo Liu-MSFT On

MSBUILD getting failed with error MSB4062

According to the error messages and the comments you posted, it seems you are build the the project that developed by Visual Studio 2017, but build it with old Visual Studio on Azure Devops.

To resolve this issue, you can try to install the Visual Studio 2017 on your private agent.

Hope this helps.