You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For enhanced developer experience, we support debugging SqlClient on Linux from Windows, using the project "**Microsoft.Data.SqlClient.DockerLinuxTest**" that requires "Container Tools" to be enabled in Visual Studio. You may import configuration: [VS19Components.vsconfig](./tools/vsconfig/VS19Components.vsconfig) if not enabled already.
191
+
192
+
This project is also included in `docker-compose.yml` to demonstrate connectivity with SQL Server docker image.
193
+
194
+
To run the same:
195
+
1. Build the Solution in Visual Studio
196
+
2. Set `docker-compose` as Startup Project
197
+
3. Run "Docker-Compose" launch configuration.
198
+
4. You will see similar message in Debug window:
199
+
```log
200
+
Connected to SQL Server v15.00.4023 from Unix 4.19.76.0
201
+
The program 'dotnet' has exited with code 0 (0x0).
202
+
```
203
+
5. Now you can write code in [Program.cs](/src/Microsoft.Data.SqlClient/tests/DockerLinuxTest/Program.cs) to debug SqlClient on Linux!
204
+
205
+
### Troubleshooting Docker issues
206
+
207
+
There may be times where connection cannot be made to SQL Server, we found below ideas helpful:
208
+
209
+
- Clear Docker images to create clean image from time-to-time, and clear docker cache if needed by running `docker system prune` in Command Prompt.
210
+
211
+
- If you face `sni.dll not found` errors when debugging, try updating below properties in netcore\Microsoft.Data.SqlClient.csproj file and try again:
0 commit comments