Reputation: 483
When I want to add a reference in a project in Visual Studio 2017 Enterprise. I get the following error:
"The operation could not be completed"
I have tried cleaning and rebuilding solution, restart computer, delete bin
and obj
folder and all .suo
files. Also there is no error in my Web.config
file.
Upvotes: 10
Views: 9134
Reputation: 1
I have tried the below steps and it worked for me.
Select the project in which you want to add the reference, then right click on it, Unload the project.
Again go to the same project, right click and then you can see the option of Edit the project. Click on it and for reference click on this link- Project_Name.csproj file(C#)
Now manually include the namespaces or any project reference present in the same solution which you want to use in the current project. For reference, click on this link- Add the references:See Highlighted
In order to create the Project UID(Unique ID)- {1140F306-2341-4D3D-BEC7-9CCA3C2AC00E}, Go to Tools -- Create GUID -- Select GUID Format i.e. Registry Format and then click on copy and then paste it into your .csproj file. For reference click on this link- GUID Tool
Then save the .csproj file and then right click on the project in which you have done changes and Reload the project.
After following the above steps, right click on the references and you can see the namespace or project reference which you have given in .csproj file
I hope, the above solution will work for others as well.
Upvotes: 0
Reputation: 483
So I got help from microsoft support.
This fixed it for me
Upvotes: 26