EditorColorPreview icon indicating copy to clipboard operation
EditorColorPreview copied to clipboard

Extension not working

Open qvisionsa opened this issue 1 year ago • 15 comments

I installed the extension in Visual Studio 17.8.6 using the following procedure:

  1. Go to Extensions
  2. Manage Extensions
  3. Select and Install
  4. Exit Visual Studio
  5. The extension installed
  6. Re-open Visual studio
  7. NOT WORKING

I tried several times with no result

I also downloaded and installed the extension form https://marketplace.visualstudio.com/ with no results also.

qvisionsa avatar Feb 07 '24 13:02 qvisionsa

I have the same problem.

I have Version 1.0.27 of Color Preview installed on Visual Studio Community 2022 Version 17.8.6 image

dbunge-mei avatar Feb 09 '24 23:02 dbunge-mei

Same here. I reported the same bug in December last year - issue #15.

I won't be holding my breath for a fix anytime soon. @madskristensen rarely replies to issues in extensions that he creates, and even more rarely does he fix and maintain them. Do a search of his repositories. It seems he's only interested in creating new extensions, then lets them die on the vine. I view this as an extremely poor performance for a PM in Microsoft's Developer Division.

Our best hope is that someone else with extension skills chooses to pick this up, debug it and produce a fix. Then wait to see if Mads even notices the PR.

graymatter00 avatar Feb 10 '24 03:02 graymatter00

Really I don't understand why this must be an extension. I think it must be INCLUDED in Visual Studio,

qvisionsa avatar Feb 12 '24 12:02 qvisionsa

This is what it looks like for me.

image

  1. NOT WORKING

@qvisionsa what did the code look like that didn't produce a color glyph?

@graymatter00 🫤

madskristensen avatar Feb 12 '24 19:02 madskristensen

@madskristensen But this is how it looks for me...

image

I'm using Visual Studio 2022 Community version 17.8.6

The Solution uses ASP.Net 4.8 / MVC / VB with two Projects. It has the latest available versions of evertything - VS Updates, NuGet packages and Extensions. It's not a particularly sophisticated web app. Just two standard websites.

Other solutions with the same structure have the same problem.

Color Preview used to work in my Solutions. I first noticed it had stopped working after the version 1.0.24 update. See #15.

While you're digging into this issue, perhaps you could also look at #10 as well.

graymatter00 avatar Feb 13 '24 02:02 graymatter00

I have done everything to reproduce the error without any luck. I installed Visual Studio 17.8.6 community. I created an out of the box Blazor Web App. Opened app.css and I see colors.

image

I will continue to figure out ways to break it and reproduce the error, until then I'm at a loss.

One option that might help me, but there are no guarantees. There might be an error that might be logged to Visual Studio logs using the /Log command-line switch. Is that something you could do and see in the logs if there is anything related to the extension?

Another theory is that the file is not being identified as a CSS content type which I assume Visual Studio determines on the file extension. But that does not seem to be the case because the style of the file in the editor looks like VS does identify it.

y2k4life avatar Feb 13 '24 17:02 y2k4life

Really I don't understand why this must be an extension. I think it must be INCLUDED in Visual Studio,

Especially since this functionality seems to exist in VS Code by default.

dbunge-mei avatar Feb 13 '24 17:02 dbunge-mei

I had it work on a file, but then I closed the file and when I opened it again, it didn't work.

dbunge-mei avatar Feb 13 '24 18:02 dbunge-mei

@madskristensen @y2k4life I've identified how to reproduce the issue. => Add a large amount of CSS to the file - close the Solution - reopen the Solution.

Using VS 2022 Community V.17.9.0, create a new Solution/Project (I selected C# ASP.Net Core Web App (Razor Pages)). Open the site.css file. Enter some CSS that should show a color preview. For example...

body {
  color: blue;
}

The color preview should display as expected. Copy and Paste that CSS over and over again untill you have a crazy amount of CSS. Say 2000 lines. The color preview should still display as expected. Save and Close the Solution. Reopen the Solution. The color preview no longer displays.

Using this example on my dev machines, I get to 1263 lines of CSS with the color preview working. When I add more lines it stops working. See screenshots...

image

image

This "close - re-open - fail" scenario also matches @dbunge-mei's observation above. https://github.com/madskristensen/EditorColorPreview/issues/17#issuecomment-1942111704

In my live Projects that demonstrate the same issue, I have over 800 lines in site.css, as well as a number of other CSS files. So, it doesn't appear to simply be the number of lines of CSS, or the size of the CSS file.

I hope this helps you to identify the problem and rectify it. Let me know if you need more detail.

Additionally, I agree with @qvisionsa and @dbunge-mei. This feature should not be an extension. It should be built-in to Visual Studio.

graymatter00 avatar Feb 16 '24 01:02 graymatter00

@madskristensen Is there any update on a fix for this issue?

graymatter00 avatar Apr 19 '24 08:04 graymatter00

The feature is broken for me in a 850 line SCSS file, but works fine in a 100 line one.

stamminator avatar Aug 28 '24 18:08 stamminator