Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating to 2023.2 cleared all RegEx patterns #15

Open
kmgallahan opened this issue Apr 19, 2023 · 20 comments
Open

Updating to 2023.2 cleared all RegEx patterns #15

kmgallahan opened this issue Apr 19, 2023 · 20 comments

Comments

@kmgallahan
Copy link
Contributor

Going to take quite a while to reconstruct all my patterns...

@mike-ward
Copy link
Owner

Must be a fluke. If that happened regularly, I would be hammered with bug reports.

@kmgallahan
Copy link
Contributor Author

On viewing vscoloroutput.json it just showed:

"Patterns": [],

Not even the defaults were left.

It looks like all of the settings are also stored in .vssettings except for patterns. I guess it would be tricky to parse them from there or something?

@mike-ward
Copy link
Owner

mike-ward commented Apr 20, 2023

Patterns are stored in vscoloroutput.json. Just delete the file and you'll get the default patterns back.

@yurikus
Copy link

yurikus commented Apr 20, 2023

This happens to me every update. I always backup the json file and routinely restore it.

Just now, updated to 2023.2, went to options, clicked on VSColorOutput64 category, file got reset:

{ "EnableStopOnBuildError": false, "ShowElapsedBuildTime": false, "ShowBuildReport": false, "ShowDebugWindowOnDebug": false, "HighlightFindResults": false, "ShowTimeStamps": false, "ShowTimeStampOnEveryLine": false, "ShowHoursInTimeStamps": false, "FormatTimeInSystemLocale": false, "SuppressDonation": false, "Patterns": null, "BuildMessageColor": { "knownColor": 0, "name": null, "state": 0, "value": 0 }, "BuildTextColor": { "knownColor": 0, "name": null, "state": 0, "value": 0 }, "ErrorTextColor": { "knownColor": 0, "name": null, "state": 0, "value": 0 }, "WarningTextColor": { "knownColor": 0, "name": null, "state": 0, "value": 0 }, "InformationTextColor": { "knownColor": 0, "name": null, "state": 0, "value": 0 }, "CustomTextColor1": { "knownColor": 0, "name": null, "state": 0, "value": 0 }, "CustomTextColor2": { "knownColor": 0, "name": null, "state": 0, "value": 0 }, "CustomTextColor3": { "knownColor": 0, "name": null, "state": 0, "value": 0 }, "CustomTextColor4": { "knownColor": 0, "name": null, "state": 0, "value": 0 }, "FindSearchTermColor": { "knownColor": 0, "name": null, "state": 0, "value": 0 }, "TimeStampElapsed": "", "FindFileNameColor": { "knownColor": 0, "name": null, "state": 0, "value": 0 }, "TimeStampDifference": "", "TimeStampColor": { "knownColor": 0, "name": null, "state": 0, "value": 0 } }

@myCrack
Copy link

myCrack commented Apr 20, 2023

Must be a fluke. If that happened regularly, I would be hammered with bug reports.

It happens time to time with my instance too. I never report it, just because i don't know how to reproduce it.

@mike-ward
Copy link
Owner

.vsix files are really just zip files in disguise. Visual Studio manages the extension installation and updates. VSColorOutput64 does not ship with a settings file. Instead, it looks for a settings files and if not found, writes a new one with a set of hard-coded values. Since the problem is intermittent and infrequent, I'm thinking there must be some race condition during installation that is tripping things up.

@yurikus
Copy link

yurikus commented Apr 20, 2023

The file gets reset the first time and only when I open options and go to the VSColorOutput64 tab/category in the list

@mike-ward
Copy link
Owner

mike-ward commented Apr 20, 2023

@yurikus Interesting... Do you have a vscoloroutput.json file in your project folder?

@yurikus
Copy link

yurikus commented Apr 20, 2023

I don't, only in the AppData/Roaming

@kmgallahan
Copy link
Contributor Author

My hypothesis is that the presence of regex expressions, which often include numerous special characters, may be causing an issue during the JSON parsing process.

@drewnoakes
Copy link
Contributor

This happened to me yesterday too.

My repro steps were:

  • Open Tools | Options | VSColorOutput64
  • Disable the "Show build time" option (as VS now has this built in)

After this, I saw no classification. Looking at the options again, I noticed all classifications were missing.

@mike-ward
Copy link
Owner

Sounds like the contents did not get flushed for closing the file. Might having something to do with the old contract serializer it uses. I'll try switching to Json.NET and see if that improves things.

@mike-ward
Copy link
Owner

Posted a new release that uses Json.Net. Fingers crossed. Side benefit, the XML output is formatted. The old DataContract serializers did not support that option

@m1lhaus
Copy link

m1lhaus commented Jun 1, 2023

I can confirm that this happened again with 2023.3. Only deleting mentioned json file in AppData/Roaming restored those patterns back for me. I must have happened wit latest VS 17.6.x update for me.

Edit: The path is c:\Users\Name\AppData\Roaming\VSColorOutput64\vscoloroutput.json

@kmgallahan
Copy link
Contributor Author

@mike-ward Is it possible to store these settings in the main VS setting file?

The new Unified Settings experience looks to be stored as JSON. Would be nice to take full advantage of settings sharing/syncing without having misc extension setting JSON files.

@mike-ward
Copy link
Owner

Makes sense to me. I'm away until October. Anyone up for doing this?

@HowardShank
Copy link

This has happened to me multiple times now. I didn't attribute it to the update until today.

I'm not sure if I'm up for doing the settings file changes though.

image

image

@ska721
Copy link

ska721 commented Sep 20, 2024

Just wanted to add that I have the same issue. It started with the upgrade to VS 17.11.3

@m1lhaus
Copy link

m1lhaus commented Sep 20, 2024

I can confirm it happened to me again with VS 17.11.3 update. I went from VS 17.11.2 to 17.11.3 via official updater and after that regexes were gone. I thought that the issue was fixed 🤔 If the root cause is unclear I would prefer to at least have a Reset to defaults button in setting dialog.

@A-Kjeldgaard
Copy link

I'm running VS 17.11.4, and i just had this issue as well. Temporarily fixed it by deleting config file as mentioned by @m1lhaus.
Both a proper fix so settings don't disappear between VS updates, as well as a reset button in the regex menu, would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants