فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
fix(a02): construct deterministic LocalDB connection string without failing property setter
davoodmehraban89 committed
Oct 30, 2026 at 19:40 UTC
986939b4bd52ea169906ecd2dc377f1c1c0633e3
1 file changed
+7
-15
scripts/a02-synthetic-sql-localdb-restore-smoke.ps1
+7
-15
@@ -53,22 +53,14 @@ try{
53
$phase='start-instance'
54
& $localdb start $instance | Out-Null
55
Require ($LASTEXITCODE -eq 0) 'A02_LOCALDB_START_FAILED'
56
- $phase='connection-string-build'
57
- $b=[System.Data.SqlClient.SqlConnectionStringBuilder]::new()
58
- $phase='connection-string-datasource'
59
- $b.DataSource='(localdb)\'+$instance
60
- $phase='connection-string-catalog'
61
- $b.InitialCatalog='master'
62
- $phase='connection-string-security'
63
- $b.IntegratedSecurity=$true
64
- $phase='connection-string-timeout'
65
- $b.ConnectTimeout=30
66
- $phase='connection-string-encryption'
67
- $b.Encrypt=$false
68
- $phase='connection-string-pooling'
69
- $b.Pooling=$false
56
+ # Only an internally generated alphanumeric LocalDB instance is used.
57
+ # Use a literal, fully assembled connection string rather than property
58
+ # assignments on a .NET Framework builder (Windows runner compatibility).
59
+ $phase='connection-string-assemble'
60
+ $connectionString='Data Source=(localdb)\\'+$instance+
61
+ ';Initial Catalog=master;Integrated Security=True;Connect Timeout=30;Encrypt=False;Pooling=False;'
62
$phase='connection-object'
71
- $conn=[System.Data.SqlClient.SqlConnection]::new($b.ToString())
63
+ $conn=[System.Data.SqlClient.SqlConnection]::new($connectionString)
64
$phase='connection-open'
65
$conn.Open()
66
$phase='create-synthetic-database'