Visual Studio 2022 Not Generating "GeneratedMSBuildEditorConfig.config"

4k Views Asked by At

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.

3

There are 3 best solutions below

0
Gup3rSuR4c On BEST ANSWER

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.

2
Code Eyez On

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.

2
GregC On

In

HKLM\SYSTEM\CurrentControlSet\Control\FileSystem

ensure

LongPathsEnabled DWORD

is set to 1