5

I was trying to debug the AWS SystemsManager source code yesterday to try and track down the long delay it causes in cold booting my ASP.NET Core 6 apps. I didn't get anywhere, but during that time it was throwing errors about generated editor configs.

I navigated to the error and it opened something that looked like a project file. I assumed it was the project file for the source and commented out that line of code and the build was now happy. In the end I un-referenced the source project copy and restored the NuGet package and closed down for the day.

Today, I can't build any solution using Visual Studio 2022. All that I have attempted throw an error that a GeneratedMSBuildEditorConfig.editorconfig is missing from the obj folder of each project in a solution.

I guess I ended up commenting out something from a Visual Studio configuration file and I haven't the slightest clue what the file name is or where it is located so I can fix my mistake.

Does anyone have suggestions where I may find this special file? I suppose in a worse case scenario I could repair VS, but I don't want to try that and find it broke something else.

My VS2019 still works correctly, so it's isolated to VS2022 install.

GregC
  • 7,737
  • 2
  • 53
  • 67
Gup3rSuR4c
  • 9,145
  • 10
  • 68
  • 126

3 Answers3

4

I had this happen because the file path was too long. Reminder for Windows the max characters a path can have is 260. Mine was 267.

Code Eyez
  • 313
  • 3
  • 14
  • This was it (although I renamed the parent folder as I was about 3 characters over the 260 limit, modifying the registry didn't help but I also didn't do a restart so might have been that! – Chris Jun 22 '23 at 14:22
3

In

HKLM\SYSTEM\CurrentControlSet\Control\FileSystem

ensure

LongPathsEnabled DWORD

is set to 1

GregC
  • 7,737
  • 2
  • 53
  • 67
  • 1
    This was it (although I renamed the parent folder as I was about 3 characters over the 260 limit, modifying the registry didn't help but I also didn't do a restart so might have been that! – Chris Jun 22 '23 at 14:22
  • Def gotta roll down the Windows, then roll them back up. – GregC Jun 26 '23 at 15:18
0

I decided to just have VS2022 repair itself and saw that there was actually an updated available today, 17.2.4, so gave it a shot. Everything is working as normal again, so I'm guessing the update replaced the configuration file I messed up and resolved the issue.

Gup3rSuR4c
  • 9,145
  • 10
  • 68
  • 126