我可以修改 Designer.vb(表单设计器)以从 winforms 窗口中删除 DataSet 控件吗?
我正在尝试更新现有的 winforms 应用程序,该应用程序是在所有 winforms 页面上使用数据集控件创建的。我已将其从 VS 2008 移植到 VS 2010,我需要更新数据库部分并使用传统代码方法将其连接到 SQL 后端。
在解决方案资源管理器中,当我单击数据集文件,然后单击“从项目中排除”时,我无法构建该项目。
是否建议注释掉引用 .designer.vb 文件中数据集的代码行?
I am attempting to update an existing winforms application, that was created with a dataset control on all the winforms pages. I have ported it from VS 2008 to VS 2010 and I need to update the database section and connect it to the SQL backend using traditional code method.
In the Solution explorer, when I click on the Dataset files, and click "Exclude From project" I am unable to build the project.
Is it advisable to comment out the code lines that refer to the dataset in the .designer.vb files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您对设计器文件中的行进行注释,它们将在重新保存后被删除。
设计器代码文件是在保存表单时生成的,因此它只会覆盖它。当事情出错时,我已经这样做过几次了。但请确保您有备份!
If you comment the lines from the Designer file, they will just get removed once resaved.
The designer code file is generated when the Form is saved, so it'll just overwrite it. I've done this a few times when things have gone wrong. Make sure you have a backup though!