Serital
Serital

Reputation: 353

"Cannot access disposed object" Error on VS SQL Unit Testing Project

I have been working on a SQL Server (SSDT) solution on VS 2017, which includes SQL unit test projects that were created by right clicking on items on the SQL project and selecting "Create Unit Tests...".

I configure the connections by right clicking on the unit testing projects and selecting "SQL Server Test Configuration...", which opens a popup to define which database the tests will run in.

I opened this solution on my second laptop for the first time and realised that when I click on "SQL Server Test Configuration..." I get an error that says: "Cannot access a disposed object. Object name: 'ComboBox'"

I could not find anything related to my situation online, most of which seems to relate to .NET code, whereas I'm struggling with the VS interface. I tried uninstalling and re-installing VS 2017 (15.9.9), created a brand new SQL project and a corresponding unit test. Problem persists.

The problem does not exist in my other laptop and a VM I'm using. My second laptop has a lot more legacy things installed but I need to use it because its specs are much higher and has a SQL server on it.

Any ideas as to what I can try?

Upvotes: 1

Views: 927

Answers (1)

Serital
Serital

Reputation: 353

In case someone else comes across this issue, after formatting my laptop several times, I realised the problem was the latest preview release of Windows. I'm part of the Insider Programme and I had recently received the latest release. I had to revert back to a previous release to fix the issue.

The release also broke Videostream for Google Chromecast for some reason:)

Upvotes: 2

Related Questions