I can't add reference in Visual Studio 2017

2020-03-04 07:20发布

I'm having issues right now on adding reference in Visual Studio 2017. So basically, I clicked on my project to show the collapsed menu where you can see folders, properties, and references. I right clicked References and chose Add reference. An error shows up and it says "The operation could not be completed. No such interface supported".

I'm currently using Microsoft Visual Studio Community 2017 Version 15.2.

4条回答
够拽才男人
2楼-- · 2020-03-04 07:54

The above answer didn't work for me. And despite me getting the same error message as the OP (and the person on the Microsoft forum), I was not getting any information in Visual Studio's ActivityLog.xml file.

I ended up having to pack my .dll in a NuGet package and add it to the project in that way. These links were helpful:

https://www.jweiler.com/create-nuget-packages-with-vs-2017/

https://stackoverflow.com/a/48549013/253938

查看更多
我欲成王,谁敢阻挡
3楼-- · 2020-03-04 08:03

I just realized I was selecting from the list of recent references, but not using the checkbox to the left of them. I'm an idiot. Or am I? Personally, I don't like how this selection works. Why are the unchecked checkboxes hidden until I select an item? Who does this? And besides, I can select like a normal listbox but also check. Very weird to me.

查看更多
劳资没心,怎么记你
4楼-- · 2020-03-04 08:06

But remember, you have to add Microsoft.VisualStudio.Shell.Interop.11.0.dll not 12 or less than 11 for Visual Studio 2017 because it will not work.

查看更多
神经病院院长
5楼-- · 2020-03-04 08:10

This thread helps me resolve the issue:

https://developercommunity.visualstudio.com/content/problem/28126/unable-to-add-reference-in-visual-studio-2017-refe.html

Just to sum it up, the thread says that I need to add a certain .dll file on the cache for me to add References. Not sure why this issue occur but I hope it helps anyone who encounters the same issue.

查看更多
登录 后发表回答