azure-pipelines-tasks: VS2019- Unable to locate master.dacpac during build
Required Information
Question, Bug, or Feature?
Bug
Enter Task Name MSBuildV1
Environment
Server Azure Pipeline
- Account Name: tesgcloud
- Team Project Name: Accelerator
- Build Definition Name: DB - tmsa Build
- Build Number: #4491
Agent Hosted
- Agent Queue Name: Agent-01
- Agent Host OS: Windows Server 2016 Standard
- Agent Version: vsts-agent-win-x64-2.150.3
Build Tools
- Name: Visual Studio Build Tools 2019
- Version: 16.0.4
- Workloads
- C++ build tools
- .NET desktop build tools
- Universal Windows Platform build tools
- Web development build tools
- Azure development build tools
- Office/SharePoint build tools
- Data storage and processing build tools
- Mobile Development with .NET
- Node.js build tools
- .NET Core build tools
- Visual Studio extension development
Issue Description
The build phase is failing at the point where the master.dacpac
reference is being resolved, with the following error message:
Error SQL72027: File “C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\IDE\Extensions\Microsoft\SQLDB\Extensions\SqlServer\AzureV12\SqlSchemas\master.dacpac” does not exist.
I have searched the server with the following PS script, and it appears that the master.dacpac
does not exist on the server in any location, including the location attempted by the build:
Get-ChildItem -Path c:\ -Recurse -Include *.dacpac -Name -Directory
In the VS SQL Project file, the master.dacpac
is referenced with the following setting:
<ArtifactReference Include="$(DacPacRootPath)\Extensions\Microsoft\SQLDB\Extensions\SqlServer\AzureV12\SqlSchemas\master.dacpac">
<HintPath>$(DacPacRootPath)\Extensions\Microsoft\SQLDB\Extensions\SqlServer\AzureV12\SqlSchemas\master.dacpac</HintPath>
<SuppressMissingDependenciesErrors>False</SuppressMissingDependenciesErrors>
<DatabaseVariableLiteralValue>master</DatabaseVariableLiteralValue>
</ArtifactReference>
Task logs
Error logs
(see: Task logs)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 25 (5 by maintainers)
It should be part of Build Tools now. I just realized that my previous comment was ambiguous and corrected it (link was pointing to build tools though). Let me know if you are not seeing the master.dacpac installed in latest version of Build Tools.
A fix for this issue is being reviewed. We will update this thread once the fix is available for download.
Thanks @markingmyname for the update.
Kaine
Adding @dhruvanmurthy for awareness
So for VS 2017 it seems they put out the fix as per 15.9.13.
As for VS 2019, the release is expected sometime early July.
Hope this helps.
Thank you.
The file master.dacpac is not found under path C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools.
Rather, it is under path C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\Microsoft\SQLDB\Extensions\SqlServer\AzureV12\SQLSchemas\master.dacpac
So, instead of using $(DacpacRootPath) variable try with the complete path as mentioned and check if the task is working properly.