4

Working with MVC4 using Visual Studio 2012 at the moment and when every I format a CSHTML document (CTRL + E + D) I get the "Waiting for a background operation to complete dialog"

This dialog stays around for roughly a minutes however I've had wait times of up to 10minutes before.

My document is not long it consists of 20< lines of basic html.

I'm only using 1 Add-in; Visual Git.

EDIT: Removing the Add-in has no effect.

EDIT2: I'm now getting the following error trying to edit the file after trying to format.

 Attempted TextBuffer edit operation while another edit is in progress.
4

2 回答 2

1

For me it seemed to be related with the razor syntax, since I only had it on one particular file.

For example if I put the following code in one line I had the described issue.

@section BodyClassName {note}

But when putting the closing parenthesis on the next line the issue went away

@section BodyClassName {note
    }

Kind regards

Stijn

于 2013-10-29T16:20:25.187 回答
0

我有同样的问题,我做了以下,它对我有用。

  1. 取消选中您的视图的只读属性(通过使用 Windows 资源管理器)
  2. 如果您已经在 VS 中打开了视图,请关闭您的视图并再次打开它。
  3. 如果您可以单击解决方案资源管理器顶部的刷新按钮,这也将重新加载文件。

它应该是可编辑的。

我希望这会有所帮助。

谢谢。

于 2013-02-14T22:25:10.443 回答