简体   繁体   English

在VS2010中是否有一种快速方法强制所有winforms designer.cs自动生成的代码在ac#项目中重新生成?

[英]Is there a quick way in VS2010 to force all winforms designer.cs autogenerated code to regenerate themselves in a c# project?

I have a lot of designer.cs files to regenerate. 我有很多designer.cs文件要重新生成。 Usually I just make some trivial edit to each of them to force the designer code to regenerate. 通常,我只是对它们每个进行一些琐碎的编辑,以强制重新生成设计器代码。 But is there a quicker way to make this happen to a bunch of designers en masse? 但是,是否有更快的方法让这一切发生在一群设计师身上呢?

I think that you'll have compile first - a rebuild would probably work best - then open each of the Forms/Controls up in design view mode. 我认为你将首先编译 - 重建可能效果最好 - 然后在设计视图模式下打开每个表单/控件。

If you really want to make sure you get the cleanest regen, then you could delete all the .designer.cs files before opening up the design view. 如果你真的想确保获得最干净的regen,那么你可以在打开设计视图之前删除所有.designer.cs文件。 This might dramatically change the order of things in the designer file though. 但是,这可能会大大改变设计器文件中事物的顺序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM