-
Notifications
You must be signed in to change notification settings - Fork 432
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
It should be possible to explicitly set sqlproj DACVersion field instead of relying on search for dacpac files #1944
Comments
Hi @rfennell , Thanks for the answer, I had seen that issue yes, but my case is slightly different in since that I don't want to version any dacpac file, even if by accident they exist on the folders, what I want is just to version the sqlproj itself, before I build it. The workaround I used was version a Directory.build.props file that I added aside sqlproj just for the purpose of containing the Version property, which works but is very ugly :). Thanks, best regards and congrats on the great tooling you provide, your tasks rock :) |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
Sorry I had missed your comment. if you are trying to update the .SQLPROJ I think the DACPAC task is the wrong one to use. The issue as I see it is that there is no standard location in the .SQLPROJ (unlike a .CSPROJ file) for the version information. So anything you come up with will be 'home grown' Maybe an update of the file could be done using generic XML file updater in my file tasks extension |
Hi @rfennell, Thanks for the quick reply, your task works fine if there are no dacpac files to update, here: it falls back to updating sqlproj files and everything has worked perfectly in every project I have, the only drawback is the time it takes before proceeding to update sqlproj in my case ( since I don't have any tools installed nor dacpacs to update ). From my understanding in sqlproj the version field is DACVersion and that is already implemented in your As a workaround, for now I'm doing something like you said but since your task is so close to achieving the goal I figured it would be interesting to have do it all ;). Thanks and best regards |
Sorry for being so slow to understand, yes of course I can add a parameter that skips the DACPPAC process and just does the SQLPROJ. I will look to get that written ASAP, hopefully this week |
Thanks @rfennell , be looking forward for your update. ;) |
The new option will be in 3.11.7 which is running through the CI/CD pipeline now and will be published this evening |
Hi @rfennell , Can you check the correction? I passed the parameter as True yet it is still searching for the tools path and thus taking a loooonnng time just to figure out it has to update sqlproj. Thanks and best regards |
Good catch, I am altering the logic flow so that the search for the tools is only done if processing DACPAC files. It should be published as 3.13.x this morning (UTC) |
Works like a charm. |
Azure DevOps Extensions
VersionDacpac
Is your feature request related to a problem? Please describe.
I'm trying to update a dacpac version through the pre-build option of VersionDacPac, I have an sqlproj file and that's what I'm trying to update.
With the current implementation the task is searching for tools in path ( visual studio/sqlpackage ), taking tremendous time, and failing if these aren't available on the agent, is searching for dacpac files ( which in fact might exist if there's any "garbage" from previous builds ) and only if it finds none it will update the sqlproj ( which is what I wanted the first place ) which is blazing fast and doesn't require any extra tools installed on the agent.
Describe the solution you'd like
If I had some parameter or different task to call in my case I would specifically say I wanted to update sqlproj file instead of any dacpac that might exist
Describe alternatives you've considered
I Considered using the task to version .net core project file but it requires the project to be from specific SDKs, even if I specified the Microsoft.Build.Sql sdk ( my project is already using the recent sdk style sqlproj ) it fails saying it's not a valid sdk style project
Additional context
No response
The text was updated successfully, but these errors were encountered: