VS2012中的资源文件未显示 [英] Resource files in VS2012 not appearing
问题描述
嘿所有:
这里有新的合适,但我想要一些帮助。我在VS2012中引用了我的应用程序中的SQL脚本(C#,如果重要的话)(Express,如果这很重要)。这是一个不会改变的脚本,它会在第一次运行时创建一个SQLite数据库。事情是,当我尝试通过Properties.Resources.XXXXXX引用它来加载它时,它不会出现,并且错误消息告诉我没有这样的引用。我可以在文件夹中看到它,我可以在解决方案资源管理器的参考资料部分看到它,但它不会让我参考它。
我明白这个文件将无法在运行时更改。我不想要它。
我试过了:
- 重新链接文件
- 删除并重新链接文件
- 关闭VS2012并重新开启
- 关闭项目并重新开启
变得沮丧,因为我对C#和VS来说是相当新的(比如,三周大)。想法?
提前致谢!
-J
Hey All:
Reasonably new here, but I would like some help, please. I've referenced a SQL script in my application (C#, if it matters) in VS2012 (Express, if that matters). It's a script that will not change, it creates a SQLite database on the first run. Thing is, when I try to reference it via Properties.Resources.XXXXXX to load it, it does not appear, and the error message tells me there is no such reference. I can see it in the folder, I can see it in the Resources section of the solution explorer, but it will not let me reference it.
I understand that this file won't be able to change at run-time. I don't want it to.
I've tried:
- re-linking the file
- deleting and re-linking the file
- closing VS2012 and reopening
- closing the project and reopening
Getting frustrated, as I'm reasonably new (like, three weeks old) to C#, and VS. Thoughts?
Thanks in advance!
-J
推荐答案
解决研究另一个网站后我自己的问题。事实证明,不能将文本文件导入到资源中,必须通过文本编辑器添加它。
感谢那些对我投降的人!
-J
Solved the problem myself after researching another site. Turns out one can't "import" a text file into the resources, it has to be added itself via the text editor.
Thanks to those who downvoted me!
-J
这篇关于VS2012中的资源文件未显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!