question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Visual Studio 17.5 and 17.5.1 issues with 3rd party Controls

See original GitHub issue

Environment

17.5 and 17.5.1

.NET version

All

Did this work in a previous version of Visual Studio and/or previous .NET release?

Yes. 17.4.5 and previous (going back to Visual Studio 2010 or earlier) all worked without issue.

Issue description

This is also submitted under Feedback here: https://developercommunity.visualstudio.com/t/Adding-control-libraries-is-not-working/10294562?port=1025&fsid=aba7d08f-0769-43a2-befb-fd6cf5e7cffb&ref=native&refTime=1678485051219&refUserId=842923cd-f358-4b57-af26-82dbd0a8431d&viewtype=all

But does not seem to be going anywhere. There are significant resources attached however, including a demo project, control dlls, and video showing the issue.

Effectively, this worked without any issue in prior versions of Visual Studio.

Visual Studio 17.5 seemingly introduced a change in how references were handled, where it automatically attempts to add a reference when a control is dragged onto a form. If the reference is already added however, the control cannot be added and generates an error that the reference is already added to the project. This then makes the software unuseable as you must delete the reference between each and every new control that you add to the form and the form designer then cannot display the form if the reference is removed…

Can this please be corrected? It is a serious issue.

Steps to reproduce

Open a form in the designer.

Drag a 3rd party control to the form. This then adds a reference to the dll to the project.

Try to add another control from the same 3rd party control library to the form. This now generates an error that the control library was already added as a reference and refuses to allow you to add the control to the form.

Delete the reference to the control library.

Drag a 3rd party control to the form. This works and again adds a reference to the dll to the project.

Try to add another control from the same 3rd party control library to the form. This now again generates an error that the control library was already added as a reference and refuses again to allow you to add the control to the form.

Diagnostics

I believe this is caused by a change in the way Visual Studio 17.5 and 17.5.1 attempt to add references automatically when you add a control to a form / project.  If the reference is already added, Visual Studio should not then attempt to add it again and should not generate an error or refuse to allow you to add the control.

Issue Analytics

  • State:closed
  • Created 6 months ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
MLyons10commented, Mar 14, 2023

I apologize for the delay in getting back with an update on this.

I uninstalled everything (Visual Studio, all of my addons, etc.) and then reinstalled everything. This worked, and I was able to use Visual Studio again.

Then, 17.5.2 came out today, so I wanted to install that update first and test again. This delayed my response as I basically was installing Visual Studio for a second time today…

I’m happy to report though that after the update to 17.5.2, everything still worked, so it looks like there was something maybe that went wrong during the update to 17.5? But regardless, I’m happy to be able to use Visual Studio again.

I wanted to thank everyone for all of your help with this and for taking the time to look into this.

And I would like to thank @Cassie-Li01 personally for spending so much time on this with me as well.

Thanks again everyone and I hope everyone has a nice rest of their day. I guess this can be closed.

0reactions
MLyons10commented, Mar 13, 2023

Thank you everyone for your comments. I have previously cleared my toolbox, uninstalled custom controls, reinstalled custom controls, created new projects, tried working on existing projects, cleaning solutions, etc.

I am completely uninstalling and reinstalling Visual Studio now and will post back tomorrow with an update on whether that resolved the issue.

I was not using preview builds, so I’m not sure if the issue existed in preview builds. I simply updated from 17.4.5 to 17.5 and then to 17.5.1 just as I’ve updated from every previous version. I did also test this with other 3rd party control libraries and I am getting the error while using others as well, including a custom control library I’ve made myself.

The Visual Studio install process takes a while, so once I have everything reinstalled I will post back with an update tomorrow. Thank you all for your help thus far.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio 17.5 and 17.5.1 issues with 3rd party Controls
NET UI framework for building Windows desktop applications. - Visual Studio 17.5 and 17.5.1 issues with 3rd party Controls · dotnet/winforms@6da50a7.
Read more >
Visual Studio 2022 - 17.5 Released
Visual Studio 2022 release summary with IDE productivity and performance improvements for developers tools.
Read more >
Visual Studio 2022 Find And Replace - Find in Files
This issues happens randomly from time to time. When using Visual Studio 2022 Find And Replace - Find in Files - it's not...
Read more >
6 New Features Coming Soon in Visual Studio 2022 (v17.5)
Visual Studio 2022 is getting a fairly significant update soon to version 17.5. In this video, I will ... GitHub Issue Integration 03:20...
Read more >
Web Froms - Visual Studio 2022 v17.5.2 hangs when ...
If I try to click on a control, VS2022 first shows the spinning "waiting" mouse cursor. If I click again, then VS2022 says...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found