Commit 8a6877d
Publish-DbaDacPackage - Fix CommandTimeout: check property exists via reflection before setting
CommandTimeout was added to DacServices in newer DacFx versions (16.x+).
Older DacFx (e.g. SQL Server 2019 ships 15.x) does not have this property,
causing 'The property CommandTimeout cannot be found on this object'.
Use reflection to check property exists before setting. Emit a warning when
the installed DacFx version does not support CommandTimeout. Also separate
the property set from the connection try/catch to avoid a misleading
'Error occurred while establishing connection' warning message.
Co-authored-by: Andreas Jordan <andreasjordan@users.noreply.github.com>1 parent 73177d7 commit 8a6877d
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
336 | | - | |
337 | 336 | | |
338 | 337 | | |
339 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
340 | 346 | | |
341 | 347 | | |
342 | 348 | | |
| |||
0 commit comments