vs Add a reference error

Calls for com component returned an error

Just use VS when we want to call the component, and then call the discovery component failure, this time we click on the calling component, the component will be prompted to call the error of the com

Step 1: Find the installation directory of VS
Here Insert Picture Description

Step two: Copy the following path
C: \ Program Files (x86) \ Microsoft Visual Studio \ 2017 \ Community \ Common7 \ IDE \ PublicAssemblies
Here Insert Picture Description
Step Three: Open the 2017 command line, type cmd, select developers vs2017 command prompt, run as administrator.

Here Insert Picture Description
Here Insert Picture Description

Here Insert Picture Description
Step 4: Enter the path to the command line cd just copy
Here Insert Picture Description
Step 5: Click Enter, type gacutil -i Microsoft.VisualStudio.Shell.Interop.11.0.dll, click the Enter button, you can see that the assembly has been successful added to the cache
Here Insert Picture Description
step six: restart VS, click references, right-click Add reference
Here Insert Picture Description

Published 45 original articles · won praise 4 · Views 1576

Guess you like

Origin blog.csdn.net/y18771025420/article/details/103966173