kevin-mueller / HtmlCssClassCompletion

A Visual Studio 2022 extension, that improvies the exisiting intellisense of css classes for html-like languages.
MIT License
38 stars 2 forks source link

Does Not Work. #21

Open Brascal opened 4 months ago

Brascal commented 4 months ago

My issue is that it does not work... at all. By that I mean, no code completion (even suppressing the built-in VS completion); nothing happens! There is nothing in the status bar indicating progress when the solution loads. No indication of anything happening when using Tools -> Scan all Projects for CSS Classes as suggested. Yes, this extension is enabled. VS 2022 (v17.9.6), .NET 8 blazor wasm project, .razor file tested.

alphaleonis commented 1 month ago

I have the same problem. It used to work for a bit, but now suddenly it seems to have stopped. If I look at the output from Extensions in VS, the following appears when I execute the "Scan all Projects for CSS Classes":

System.NotImplementedException: Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at Microsoft.VisualStudio.CommonIDE.Solutions.Dte.DteGenericProject.GetFileName()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at HtmlCssClassCompletion22.ElementCatalog.<>c__DisplayClass11_0.<<GetProjectPathsWithReferencesAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at HtmlCssClassCompletion22.ElementCatalog.<GetProjectPathsWithReferencesAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at HtmlCssClassCompletion22.ElementCatalog.<RefreshClassesAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at HtmlCssClassCompletion22.RefreshCssClassesCommand.<ExecuteAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Community.VisualStudio.Toolkit.BaseCommand.<>c__DisplayClass8_0.<<Execute>b__0>d.MoveNext()

EDIT: Well, that one was easy to solve. It appears this error appears if any projects in the solution were unloaded. I reloaded all projects and the problem went away. So perhaps this is a separate bug.