Designer.cs不会自动更新 [英] Designer.cs not updating automatically

查看:158
本文介绍了Designer.cs不会自动更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的aspx文件中添加了一个新的控件,并注意到新的控件不仅没有添加到设计器文件中,而且还缺少了团队其他成员添加的其他一些控件。我尝试删除designer.cs文件并使用转换为Web应用程序但没有成功。我尝试过的其他一些事情已经从项目中排除了aspx,构建,然后重新包含但没有成功。我还手动输入设计器中缺少的控件。当我这样做后,会出现一个错误,说明控件没有定义,即使它实际上是,并且我应该检查我是否错过了指令。



我添加的第一个控件是来自类似控件的复制和粘贴,并进行了必要的更改。但是,我也尝试手动创建具有相同结果的控件。

解决方案

从这个和你之前的问题,我相信你在整个解决方案中都有严重的问题/ projects。

如果这个解决方案不是那么大,那么我建议让经验丰富的开发人员从头开始重建解决方案或修复现有问题(以较为简单的方式)可能符合您的最佳利益。在这一点上)然后把它交还给你。

如果你正在使用某种类型的源代码控制,你也可以恢复到那里的最后一个好版本,然后再从那一点重新应用这些更改。


OFFTOPIC:



只是一个(有点偏执)的提示,如果项目的大小允许它,当然。



在您下班前的下午结束时,请执行* .zip / * .rar(或您喜欢的任何格式)备份代码文件夹。



将过去2或3周的备份保留为缓冲区,以防万一。你永远不知道第二天会发生什么。







编辑:文字更正

我遇到了类似的问题,下面链接的解决方案对我来说非常合适。尝试一下。它非常简单,节省了大量的精力和时间。 http://swsharinginfo.blogspot.in/2012/03/regenerate-designer- file-in-visual.html [ ^ ]


I've added a new control to my aspx files and noticed that not only was the new control not added to the designer file but that it was also missing quite a few other controls that were added by other members of the team. I've tried deleting the designer.cs file and using "Convert to Web Application" with no success. Some other things i've tried have been excluding the aspx from the project, building, and then re-including with no success. I've also manually entered in a control that was missing in the designer into the designer. When I run after do so an error appears saying the control isn't defined, even though it actually is, and that I should check if I'm missing a directive.

The first control I added was copy and paste from a similar control and made necessary changes. But, i've also tried manually creating the control with the same results.

解决方案

From this and your previous questions, I believe you have serious issues in your entire solution/projects.
If this solution is not that large, then I would suggest that it may be in your best interest to have an experienced developer rebuild the solution from scratch or fix the existing issues (whichever is easier at this point) and then hand it back to you.
If you are using source control of some kind, you could also just revert back to the last "good" version that is in there and then reapply the changes from that point forward again.


OFFTOPIC:

just a (a bit paranoic) tip, if the size of the project allows it, of course.

At the end of the afternoon before you live, do a *.zip/*.rar (or whatever format you like more) backup of the code-folder.

Keep the backups of the last 2 or 3 weeks as buffer, just in case. You never know what can happens on the next day.



Edit: Text corrections


I have faced the similar issue and the solution at below link work perfectly for me. Do try it.Its very simple and saves lots of efforts and time. http://swsharinginfo.blogspot.in/2012/03/regenerate-designer-file-in-visual.html[^]


这篇关于Designer.cs不会自动更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆