これは今まで見たことがなく、何が原因なのかわかりません。
以下のコードの最後にブレークポイントを配置すると、elapsedSeconds 変数がローカル ウィンドウに表示されません。ウォッチしようとすると、Value = "The name 'elapsedSeconds' does not exist in the current context". そんなことがあるものか???
public ActionResult Index()
{
Stopwatch sw = Stopwatch.StartNew();
var userID = WebSecurity.GetUserId(User.Identity.Name);
var model = ModelHelper.GetModel(userID);
long elapsedSeconds = 0;
elapsedSeconds = sw.ElapsedMilliseconds;
return View(model);
}