当我在 C++ 中添加 .settings 文件时,Visual Studio 崩溃 Windows 窗体应用程序
我正在尝试通过在项目中添加(无论什么)文件并将其命名为 smthng.settings 来在 Windows 窗体应用程序中添加 .settings 文件。 创建后,它立即崩溃(如果我查看项目的目录,该文件就在那里,但它不在项目“中”)。 是我做错了还是问题出在其他地方?
编辑:看来是设置设计器崩溃了。
部分解决:如果我添加一个 (whatever).config
文件,然后将其重命名为 .settings 并将其文件类型更改为 C/C++ 代码(不要问我是怎么想出来的..)然后我可以添加到它的设置,但如果我添加一些与表单有任何连接的东西,那么会自动生成一个具有相同名称的 (whatever).config
(与 (whatever).setting
即使更改其中之一),并且在 stdafx.cpp
处出现 #include '(whatever).h'
,即有问题,因为没有这样的标头。 (如果我删除它或只是创建一个空白的 (whatever).h
它不起作用。显然我必须以某种方式连接 (w/e).settings< 中的所有数据/code> 到
(w/e).h
以及或者其他东西)以前有人遇到过这个问题吗? 有人有什么想法吗?
I'm trying to add a .settings file in a windows form application by adding a (whatever) file in the project and have it named smthng.settings. Right after it is created, it crashes (if I look into the project's directory the file is there, but it's not "in" the project). Am I doing it wrong or could it be that the problem lies elsewhere?
Edit: It seems that it's the settings designer that crashes.
Partially Solved:If I add a (whatever).config
file, then rename it to .settings and change it's file type to C/C++ Code (don't ask how I figured this out..) then I can add to it settings, but if I do add something that has any connection to the form then automatically a (whatever).config
with thew same name spawns (which is identical to the (whatever).setting
even if change one of them) and at the stdafx.cpp
a #include '(whatever).h'
appears, which is a problem, because there is not such a header. (if I erase it or just create a blank (whatever).h
it doesn't work. Apparently I have to somehow connect all the data in the (w/e).settings
to (w/e).h
as well or maybe something else) Anyone had this problem before? Anyone has any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果它崩溃了,那么考虑到您可能做错了什么,这是一个错误 - 软件不应该因无效的用户输入而崩溃。 也就是说,原因可能是任何原因,从 VS 本身的错误,到您正在使用的某些第三方扩展的错误,再到系统问题。
确保您拥有 VS2005 的所有最新操作系统更新和服务包。 如果仍然重现,请将其作为错误报告给 Microsoft Connect 以及对此负责的人员产品区域将从那里开始。
If it crashes, then regarding of what else you may be doing wrong, it's a bug - software shouldn't crash on invalid user input. That said, the causes could be anything from bug in VS itself, to bug in some third-party extension you're using, to system problems.
Make sure you have all the latest OS updates and service packs for VS2005. If it still repros then, report it as a bug to Microsoft Connect, and people responsible for this product area will take it from there.