-
Notifications
You must be signed in to change notification settings - Fork 420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 1225 #1226
base: master
Are you sure you want to change the base?
Issue 1225 #1226
Conversation
fixes microsoft#1225 tested and confirmed locally with: . "$PSScriptRoot/SqlPackageOnTargetMachines.ps1" Get-SqlPackageOnTargetMachine
@dzsquared FYI! Please have a look 😄 |
Tested and works for 2019 and 2022. Output: PS C:\WINDOWS\system32> Get-SqlPackageOnTargetMachine
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\150\SqlPackage.exe PS C:\WINDOWS\system32> Get-SqlPackageOnTargetMachine
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\SqlPackage.exe |
@b3go Thanks for confirming! |
@dzsquared wonder if this is enough to also affect the azuresqldeployment task? |
Looks like there is duplicate code in another repo: https://github.com/microsoft/azure-pipelines-tasks/blob/master/Tasks%2FSqlAzureDacpacDeploymentV1%2FFindSqlPackagePath.ps1#L348-L352 |
TaskModules/powershell/TaskModuleSqlUtility/SqlPackageOnTargetMachines.ps1
Show resolved
Hide resolved
Often the version from the dac.msi installer ( Just fyi - the version in azure-pipelines-tasks has another PR open on it to enable more versatility - microsoft/azure-pipelines-tasks#19648 Finally, the dotnet tool version of Sqlpackage was mentioned by @b3go and indeed we're hoping to integrate it with these tasks in the future - but this change doesn't need to be held up for that larger adjustment. thank you @ErikEJ! |
Ah, that's why there have been no issues from hosted agents. |
I'm a bit confused. We are using the |
@PaulVrugt Are you still affected by this - I think the version in |
@dzsquared @PaulVrugt Gave up on the other task, too many moving parts |
Well yes, because we are not using hosted agents, we use private agents. Once I updated visual studio on the private agent image, the error started appearing. We now fixed it by updating sqlpackage on the private agent manually, but this would have been prevented if the task worked properly and found the sqlpackage of visual studio (which was updated with the visual studio update) |
@PaulVrugt Got it! I encountered multiple issues trying to fix the other task:
|
Lol. Ok so in summary:
Well, thanks at least for trying. We'll create our own safeguards to keep sqlpackage.exe up to date at the location |
fixes #1225
Description: Look for SqlPackage.exe presence and version in the Visual Studio DAC folder introduced in later VS versions
Documentation changes required: N
Added unit tests: N
Attached related issue: #1225
Checklist:
Verified with