microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.55k stars 898 forks source link

Could not load file or assembly 'System.Diagnostics.StackTrace' in main #22838

Closed cheenamalhotra closed 1 year ago

cheenamalhotra commented 1 year ago

Noticed this is happening with recent update of STS to v4.7.0.17. Works until v4.7.0.16 (https://github.com/microsoft/sqltoolsservice/compare/4.7.0.16...4.7.0.17)

@Benjin can you please check?

Steps to Reproduce:

  1. Open any connection

Getting this error:

System.IO.FileNotFoundException: Could not load file or assembly 'System.Diagnostics.StackTrace, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
File name: 'System.Diagnostics.StackTrace, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at Microsoft.Data.SqlClient.SqlConfigurableRetryLogicManager.get_ConnectionProvider()
   at Microsoft.Data.SqlClient.SqlConnection.get_RetryLogicProvider()
   at Microsoft.Data.SqlClient.SqlConnection.get_IsProviderRetriable()
   at Microsoft.Data.SqlClient.SqlConnection.OpenAsync(CancellationToken cancellationToken)
   at Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection.ReliableSqlConnection.<>c__DisplayClass30_0.<<OpenAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.SqlTools.ServiceLayer.Connection.ConnectionService.TryOpenConnection(ConnectionInfo connectionInfo, ConnectParams connectionParams)

image

Benjin commented 1 year ago

Looking into this today. I changed something in DacFx.Projects to add additional context to an exception, so maaaybe that's it?

Benjin commented 1 year ago

I've been unable to repro this with the latest main on either Windows or macOS. Does anyone else have a consistent repro?

Charles-Gagnon commented 1 year ago

@cheenamalhotra Were you perhaps using a locally built version of STS? If so did you ensure that all the build dependencies were there?

cheenamalhotra commented 1 year ago

Cleaning up the sts download folder did help, so it's possible I had a bad copy or incomplete download.. Closing as I can't repro anymore.