LINQ to SQL designer not opening/timing out (VS 2022)
Asked Answered
S

3

9

On Visual Studio 2022, Windows 11.

Linq to SQL tools is installed from installer (Individual Components).

When right clicking a dbml file and View Designer, it just sticks on this and eventually needs an end task:

DBML fail

Tried (to no avail):

  • Clearing all app.config connection strings in the same project (in case it was silently barfing on one of those)
  • Installing older .NET frameworks, ticking on Data Storage and Processing and Data sources and service references

Any ideas what might be causing this? (Ran OK under Win 10 / VS 2022).

Edit: I've had this after every new PC install with Win 11, VS 2022 (3 work PCs), but it seems to resolve itself after a few days. I now know why, see marked answer re toolbox.

Spinnaker answered 30/3, 2022 at 10:57 Comment(0)
S
18

Viewing the Toolbox and (optionally) resetting it (right click > Reset) seems to solve this. It seems the designer can't open when the toolbox is not initialised (or fails to initialise). It is often a while before I open the toolbox on a new install so I kept on encountering this problem.

Spinnaker answered 11/11, 2022 at 12:50 Comment(3)
wow i am amazed this worked, thank you, i wonder how did you discovered this, and why Microsoft is not doing anything about itRella
@CristianOlaru just a pure chance discovery, was a very annoying undocumented issue.Spinnaker
Just updated to VS Version 17.10.0 Preview 5.0 and started to encounter the same issue. Opening VS, opening the Toolbox and allowing it time to initiate, then opened the DBML file and it worked like a dream. Thanks for the info @Spinnaker :)Veneer
M
4

FWIW this Toolbox thing didn't work for me. The fix for me (using VS 2019) was the following:

  1. Type "Linq to SQL" in the Visual Studio search box (in the top nav/toolbar)
  2. Clicking the resulting "Install Linq to SQL Tools" link
  3. Letting the install finish/reloading Visual Studio

Source

Mighty answered 23/10, 2023 at 19:26 Comment(1)
Different issue not having it installed.Spinnaker
C
1

I experienced the same problem on Win8 with VS 2015 and 2017 and 2019, Win10 with VS 2015 and 2017. I did not solve the problem. Do not know what causes this problem. But now on Win11 with 2022 I opened my problematic DBML file, it took really long time to open (during opening it showed Not responding etc.) but finally VS opened DBML file. Then I made a change in the designer (just moved class a little bit = change = auto-generated file will be re-generated after save) and saved. Now this particular DBML file is opened within a second. Try it.

Conventionality answered 5/5, 2022 at 8:35 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.