Open qvisionsa opened 10 months ago
I have the same problem.
I have Version 1.0.27 of Color Preview installed on Visual Studio Community 2022 Version 17.8.6
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.
Really I don't understand why this must be an extension. I think it must be INCLUDED in Visual Studio,
This is what it looks like for me.
- NOT WORKING
@qvisionsa what did the code look like that didn't produce a color glyph?
@graymatter00 🫤
@madskristensen But this is how it looks for me...
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.
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.
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.
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.
I had it work on a file, but then I closed the file and when I opened it again, it didn't work.
@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...
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.
@madskristensen Is there any update on a fix for this issue?
The feature is broken for me in a 850 line SCSS file, but works fine in a 100 line one.
I installed the extension in Visual Studio 17.8.6 using the following procedure:
I tried several times with no result
I also downloaded and installed the extension form https://marketplace.visualstudio.com/ with no results also.