Open kmgallahan opened 1 year ago
Must be a fluke. If that happened regularly, I would be hammered with bug reports.
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?
Patterns are stored in vscoloroutput.json
. Just delete the file and you'll get the default patterns back.
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 } }
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.
.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.
The file gets reset the first time and only when I open options and go to the VSColorOutput64 tab/category in the list
@yurikus Interesting... Do you have a vscoloroutput.json
file in your project folder?
I don't, only in the AppData/Roaming
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.
This happened to me yesterday too.
My repro steps were:
After this, I saw no classification. Looking at the options again, I noticed all classifications were missing.
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.
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
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
@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.
Makes sense to me. I'm away until October. Anyone up for doing this?
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.
Just wanted to add that I have the same issue. It started with the upgrade to VS 17.11.3
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.
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.
Going to take quite a while to reconstruct all my patterns...