Closed iknyc closed 6 years ago
@iknyc , I have filed a bug for this. Right now, for unblocking yourself, you can download the data tier application framework (DacFx) from here
@iknyc, were you unblocked after installing DacFx?
@iknyc are you still facing the issue ?
closing this, please feel free to get back
@asranja @chshrikh apologies for the excessively late response. Should I be testing / validating a fix you merged into master?
If you haven’t deployed a fix, then the answer is no, but with a caveat. I’ve bypassed the flaw in the code logic by artificially creating the registry key the script was looking for. If I delete this registry key, and attempt to reproduce the issue without any remediation from your team, I will indeed be having the same issue.
Please advise! Thank you.
Troubleshooting
The Release task SqlDacpacDeplopymentOnMachineGroup fails to find sqlpackage.exe on the machine, despite the fact that it is installed via VS2017.
Agent = Private (DeploymentGroup) [version: vsts-agent-win-x64-2.126.00]:
CPU Status OK OS Name Microsoft Windows Server 2016 Standard OS Service Pack 0.0 OS System Drive C: OS Version 10.0.14393 OS Windows dir C:\Windows
Issue Description
The SqlPacakgeOnTargetMachines.ps1 script downloaded as part of the task seems to look in the registry for a string value associated with "InstallDir" in the version root for Visual Studio (10.0, 12.0, 14.0, 15.0). After investigating additional machines, "InstallDir" is only present up through version 14.0. Since VS2017 is version 15.0, InstallDir is never located, and the task fails.
Error logs
The following is the output running the powershell code manually via VS Code on the target machine in the machine group. The code is run from the agent _tasks directory with increased verbosity:
A successful execution would reveal the install location of visual studio per line 323 of SqlPacakgeOnTargetMachines.ps1:
Yielding an output of
VERBOSE: Visual Studio install location: [Location Here]
In order to get the script to work correctly, I've temporarily created the "InstallDir" string in the registry:
and I set the value to be E:\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\ (The location I have VS2017 installed). After doing so, this is the output of the script:
... and the task works.
The agent has SqlPackage registered as a capability:
Please modify the task to search for SqlPackage using a different method.