-
Notifications
You must be signed in to change notification settings - Fork 47
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
Escaping SQLCMD values that contain complex strings #458
Comments
I took a look at the MSBuild SDK here and I see a direct call to the
I'd suggest instead of using Exec directly, y'all should make a task deriving from |
As a work-around for the time being - wrote some PowerShell scripts to pass these |
@baronfel Interesting, I didn't know about that when I first wrote this. Could be worth investigating I guess, just not sure when I'll find the time to do it though. It also complicates the setup a little bit as currently the SDK is only a bunch of MSBuild files and a command line tool that does the heavy lifting. This would require adding an additional assembly that would contain the MSBuild task. If anyone's up for it and willing to submit a PR that would be great. To fix @Aaronontheweb's issue though I think we could fix the escaping with the current setup as well, at least regarding any SQLCMD parameters being passed. |
@Aaronontheweb We have a PR now that should fix this issue. |
Version 2.6.1 just got released on NuGet.org which contains the fix for this issue. |
thank you! |
Working on creating an automatic versioning table that uses MSBuild properties injected into SQLCMD variables that are used in a post-deploy script:
Problem I'm running into while running
dotnet build -c Release
:My
$(PackageReleaseNotes)
is defined inDirectory.Build.props
and contains markdown syntax:What can I do to escape the value of this MSBuild variable when it's passed into SQLCMD?
The text was updated successfully, but these errors were encountered: