random cs files not opening in visual studio 2012

前端 未结 6 1568
灰色年华
灰色年华 2021-02-19 19:47

So here\'s my pickle. I\'m using Visual Studion 2012 and been developing my application without a hitch. I opened VS today and I can open all the files as I normally would (cs

6条回答
  •  清歌不尽
    2021-02-19 20:18

    In my case the files had some unicode characters or other encodings, possibly a result of corrupted file. I right clicked-> Open With...-> and switched to the "C# Editor with encoding" option. Note this will prompt every single time to ask if it should auto detect encoding, which is very annoying but hopefully you can find the offending characters and fix them.

提交回复
热议问题