Visual Studio 17.5 and 17.5.1 issues with 3rd party Controls
See original GitHub issueEnvironment
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:
- Created 6 months ago
- Comments:8 (5 by maintainers)
Top GitHub Comments
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.
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.