为什么我修改后的 .NET Windows 窗体在再次运行程序后没有显示新的更改?
在我的桌面应用程序中,之前我已经设计了表单并执行了十次,但后来我对表单进行了细微的更改。但即使在更改之后,当我现在运行程序时,也会显示以前创建的表单。
可能是什么问题...有人可以帮助我吗?
In my desktop application, previously I have designed the form and ten execute it but then I went for slight changes in my form.But even after changing, while I run the program now the previously created form is getting displayed.
What might be the problem...could anyone help me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试:
删除解决方案中的所有 \BIN 目录
Build->Clean project
Rebuild All
Try:
Delete all the \BIN directories in your solution
Build->Clean project
Rebuild All
另一个需要检查的地方是解决方案构建配置。
确保您的项目正在构建。
如果它没有被构建,那么您的更改将不会显示。
Another place to check is the solution build configuration.
Make sure your project is being built.
If it is not being built, then your changes wont show up.
当您在可视化设计器中对 Form1 进行更改时,Visual Studio 将在名为 Form1.Designer.cs 的文件中找到的代码中反映这些更改,方法名为 InitializeComponent()。这是您可以检查错误的地方。
When you make changes to, say, Form1, in the visual designer, Visual Studio will reflect those in the code found in the file called Form1.Designer.cs, in the method called InitializeComponent(). That's one place you can check for errors.