本文介绍了mypage.aspx.designer.cs未生成代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将以前的mypage.aspx中的代码合并到新的分支mypage.aspx中.我还更改了mypage.aspx.cs文件.但是mypage.aspx.designer.cs文件不会生成代码.

i'm merging the code from previous mypage.aspx to new branch mypage.aspx.i also change the mypage.aspx.cs file. But mypage.aspx.designer.cs file not generate the code.

我不小心从mypage.aspx.designer.cs中删除了一些代码.

i delete some code from mypage.aspx.designer.cs accidentally.

现在,它在mypage.aspx.cs文件上显示错误.

Now it show error on mypage.aspx.cs file.

错误:该名称在当前上下文中不存在

ERROR : The name does not exist in the current context

我尝试

清理并重建

仅供参考,我无法删除文件.我无法添加任何新文件.就像删除文件一样,以相同的名称创建文件.

FYI I cant Delete the File. i cant add any new file. Like delete the file create the file in Same Name Like that.

请帮助我解决此问题.谢谢.

Please Help me to fix the issue.Thanks.

推荐答案

有时只需保存 ASPX 文件 + 即可解决问题

Sometime just saving the ASPX file + solves the problem.

在最坏的情况下,您可以删除designer.cs,然后使用转换为Web应用程序重新创建它.

The worst case you can delete designer.cs, and recreate it by using Convert to Web Application.

注意:它将仅转换单个designer.cs(而不是整个应用程序).

Note: it'll only convert individual designer.cs (not entire application).

在VS 2013中,转换为Web应用程序已移到项目下.

In VS 2013, Convert to Web Application is moved under Project.

这篇关于mypage.aspx.designer.cs未生成代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 03:49
查看更多