Repository navigation
Is an official sqlcmd NuGet package available for Windows CI? #825
Replies: 1 comment
|
I couldn't find an official NuGet package. Nothing on nuget.org for go-sqlcmd is owned by Microsoft, and the repo doesn't build one. The official Windows channels are the GitHub release assets (zip and MSI), winget and Chocolatey, and the Chocolatey package just wraps the MSI. The release zip is easy to vendor, though. $v = '1.10.0'; $sha = 'a4c28332fcc6e497d655e53ac8f4939f4ab170f9cfd32d0fa5081b60f4d9d691'
Invoke-WebRequest "https://github.com/microsoft/go-sqlcmd/releases/download/v$v/sqlcmd-windows-amd64.zip" -OutFile sqlcmd.zip
if ((Get-FileHash sqlcmd.zip).Hash -ne $sha) { throw 'checksum mismatch' }
Expand-Archive sqlcmd.zip pkg\tools
nuget pack sqlcmd.nuspec -Version $v # nuspec maps pkg\tools\** to tools/With In 1.10.0, GO,
sqllocaldb start MSSQLLocalDB | Out-Null
$pipe = (sqllocaldb info MSSQLLocalDB | Select-String 'np:\S+').Matches[0].Value
& $sqlcmd -S $pipe -E -b -i .\setup.sql # $sqlcmd = tools\sqlcmd.exe from the restored packageWhether one is planned is for the maintainers to say. |
Uh oh!
There was an error while loading. Please reload this page.
Hi team,
We’d like to consume sqlcmd (Go) as a version-pinned NuGet dependency for Windows x64 CI tests, rather than rely on a global installation or PATH configuration.
Our agents already have SQL Server LocalDB. We need a package containing sqlcmd.exe and any required runtime dependencies.
Requirements:
Run directly from the restored package directory, without additional installation or downloads during tests.
Windows authentication and LocalDB compatibility.
Support for GO, :r, :setvar, :On Error Exit, and UTF-8 scripts.
We’re aware of the LocalDB discussion in #470 and would validate the supported connection method, including named pipes if needed.
Is an official NuGet package available or planned? If not, would the team consider publishing one, or point us to the appropriate owner/process for requesting it?
Thanks!
All reactions