Unable to type in Visual Studio

2019-01-29 17:52发布

I am unable to edit any files in a project in Visual Studio 2013. It only happens in one project. If I open a different project I am able to type fine, but once I go back into the problem project I am unable to type in the editor windows. Not sure if it matters but the project that is giving me issues we are using SVN on. The other projects are just local ones on the machine. I have restarted Visual Stuido, restarted the computer and still am unable to edit the files. Any ideas?

6条回答
孤傲高冷的网名
2楼-- · 2019-01-29 18:27

I had this same issue today (couldn't even edit brand new files), but it turned out to be due to the "Source Control Plug-In". I use AnkhSVN and performed an update when prompted yesterday. For whatever reason this left me unable to edit any file types besides JSON. Here are the steps I went through to fix it:

  1. Open Visual Studio options (Tools -> Options)
  2. Change the "Source Control Plug-In" to "None" (Source Control -> Plug-in Selection)
  3. Restart Visual Studio
  4. Repeat steps 1-3, except re-enable AnkhSVN in step 2

I was able to edit files again after this.

查看更多
对你真心纯属浪费
3楼-- · 2019-01-29 18:32

Are the files in question read-only? That might explain why you can't change them.

I'm not familar with SVN, but in some source control systems, you have to check-out a file before you modify it.

查看更多
可以哭但决不认输i
4楼-- · 2019-01-29 18:37

This exact thing happened to me. Do you have ReSharper? If so, the solution I found here may work for you. From Alexander's comment in the accepted answer:

Try cleaning R# caches C:\Users{User Name}\AppData\Local\JetBrains\ReSharper\v8.2\SolutionCaches\ and then reopen the solution

From below comment - that's %userprofile%\AppData\Local\JetBrains\ReSharper\v8.2\SolutionCaches for those that want to Win+R.

From comment below, another possible location: %userprofile%\AppData\Local\JetBrains\Transient\ReSharperPlatformVs12\v02\Soluti‌​onCaches

Update - Another Easier Option:

You can also go to ReSharper option, Environment/General, click on Clear Caches and restart Visual Studio – Chin Feb 27 at 2:02 enter image description here

查看更多
劳资没心,怎么记你
5楼-- · 2019-01-29 18:39

Simply delete your all temp file from temp folder.

Note: Before delete temp file close visual studio.

To delete temp files:

  1. Open Run window by pressing Windows button + R
  2. Type %temp% in the text box.
  3. Press enter

Run window image

Now you will see your all temp file. Just press Ctrl+A to select all files in the temp folder. Now delete all of them. some files will not be deleted. Just skip them.

Now Open Your visual studio and try to edit syntax. I hope it will work now!

查看更多
别忘想泡老子
6楼-- · 2019-01-29 18:40

Happened to me today, for me the problem was with typescript files. I couldn't write in any .ts file, and this was because I created a tsconfig.json file, but didn't populate it yet (it was empty). Then I was interrupted and forgot I had this empty file, and it took me a while to realize this was the cause of the issue. This issue happened in visual studio 2015.

查看更多
在下西门庆
7楼-- · 2019-01-29 18:41

For me, Cleaning the solution worked fine.

查看更多
登录 后发表回答