0
votes

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.

2
which version of ssdt are you using ?D.J.
@D.J. using SSDT2019dinesh t
that version won't with vs2012D.J.
@D.J. Actually I am using VS 2017 i got error during build so i pass the build parameter as 2012 to msbuilddinesh t

2 Answers

0
votes

Use

/p:StyleCopEnabled=false for .netFramework with msbuild

-p:StyleCopEnabled=false for dotnetcore with dotnet publish

-1
votes

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.