Cannot load relative line numbers in Visual Studio 2017 enterprise
After installing extension relative line numbers in Visual Studio 2017 success, I opened a new project and found that the relative line number plugin is not loaded correcly. Open logs in ActivityLog.xml I saw following error
System.Runtime.InteropServices.COMException (0x80131163):
Type library exporter encountered an error while processing
RelativeLineNumbers.OptionPageGrid.SaveSettingsToXml(writer),
RelativeLineNumbers.
Error: Type library exporter encountered an error while processing;
Microsoft.VisualStudio.Shell.Interop.VSSAVETREEITEM.pHier,
Microsoft.VisualStudio.Shell.Interop.8.0.
Error: Type library exporter encountered an error while processing;
Microsoft.VisualStudio.Shell.Interop.SVsSolutionObject,
Microsoft.VisualStudio.Shell.Interop.
Error: Type SVsSolutionObject;
and type SVsSolution;
both have the same UUID;
at EnvDTE.\_DTE.get\_Properties(String Category, String Page)
at RelativeLineNumbers.RelativeLineNumbers..ctor(IWpfTextView textView, IEditorFormatMap formatMap, DTE dte)
at RelativeLineNumbers.MarginFactory.CreateMargin(IWpfTextViewHost textViewHost, IWpfTextViewMargin containerMargin)
at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.<AddMargins>b\_\_25\_1(IWpfTextViewMarginProvider mp)
at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension\[TExtension,TMetadata,TExtensionInstance\](Object errorSource, Lazy\`2 provider, Func\`2 getter)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
You can fix this issue by reference this with a little revision
- Launch “Developer Command Prompt for VS 2017” as Administrator
- Go to VS 2017 installation folder cd C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise
- gacutil -if Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.Shell.Interop.dll
key point is last line, Microsoft.VisualStudio.Shell.Interop.[8|11|12].0.dll
won't work for me. Hope this helps, happy coding :)