Windows 10 Pro 64-bit
Hello Support,
If I Run the following script section within PSS or MS ISE, no exception is thrown and it runs to completion. However if I Debug with a breakpoint set on line 2 it isn't possible to Step Into (F11) that line, or beyond, without an exception being thrown. I can successfully accomplish this with MS IDE.
Code: Select all
Write-Host 'Opening Statement - Can break here'
$sqlCommand = New-Object System.Data.SqlClient.SqlCommand
Write-Host 'Closing Statement - Can`t step into here during debug'
>> Debugging (SQLcommand_debug_error.ps1) Script...
>> Platform: V5 64Bit (STA)
Opening Statement - Can break here
ERROR: Ambiguous match found.
SQLcommand_debug_error.ps1 (3, 1): ERROR: At Line: 3 char: 1
ERROR: + Write-Host 'Closing Statement - Can`t step into here during debug'
ERROR: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ERROR: + CategoryInfo : OperationStopped: (:) [], AmbiguousMatchException
ERROR: + FullyQualifiedErrorId : System.Reflection.AmbiguousMatchException
ERROR:
>> Script Ended
Any idea what might be causing this and how it could be worked around? I'm using SQL interaction extensively in a sizeable script and it's proving difficult to realise without access to IDE debug facilities.
The .Net Framework version is 4.7 and the System.Data assembly version is as follows:
> $type.Assembly.ImageRuntimeVersion
v4.0.30319
> $type.Assembly.Location
C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll
> $type.Assembly.FullName
System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Thank you,
Glenn