VSColorOutput64 icon indicating copy to clipboard operation
VSColorOutput64 copied to clipboard

Updating to 2023.2 cleared all RegEx patterns

Open kmgallahan opened this issue 1 year ago • 17 comments

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

kmgallahan avatar Apr 19 '23 13:04 kmgallahan

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

mike-ward avatar Apr 19 '23 17:04 mike-ward

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?

kmgallahan avatar Apr 19 '23 20:04 kmgallahan

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

mike-ward avatar Apr 20 '23 00:04 mike-ward

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 } }

yurikus avatar Apr 20 '23 09:04 yurikus

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.

myCrack avatar Apr 20 '23 11:04 myCrack

.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.

mike-ward avatar Apr 20 '23 12:04 mike-ward

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

yurikus avatar Apr 20 '23 12:04 yurikus

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

mike-ward avatar Apr 20 '23 12:04 mike-ward

I don't, only in the AppData/Roaming

yurikus avatar Apr 20 '23 12:04 yurikus

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.

kmgallahan avatar Apr 20 '23 21:04 kmgallahan

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.

drewnoakes avatar Apr 22 '23 10:04 drewnoakes

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 avatar Apr 23 '23 16:04 mike-ward

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

mike-ward avatar Apr 25 '23 13:04 mike-ward

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

m1lhaus avatar Jun 01 '23 04:06 m1lhaus

@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.

kmgallahan avatar Jun 01 '23 19:06 kmgallahan

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

mike-ward avatar Jun 01 '23 22:06 mike-ward

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

HowardShank avatar Jan 14 '24 19:01 HowardShank

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

ska721 avatar Sep 20 '24 08:09 ska721

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.

m1lhaus avatar Sep 20 '24 15:09 m1lhaus