简体   繁体   English

如何在编译之前读取添加到项目中的文本文件?

[英]How to read a text file which is added to project before complilation?

I have such problem. 我有这样的问题。

I have text file. 我有文本文件。 I'd like to add it into my project and then read it. 我想将其添加到我的项目中,然后阅读。 This file is Lua script. 该文件是Lua脚本。 I read, that I can read it and save in IsolatedStorage. 我读到可以阅读并保存在IsolatedStorage中。 But I have several problems: 但是我有几个问题:

I'm writing in C#, XNA 4.0, Windows Phone 8 SDK. 我正在用C#,XNA 4.0,Windows Phone 8 SDK编写。 In SDK there is no classes like 'Application' (System.Windows - there is no such namespace) 在SDK中,没有像“应用程序”这样的类(System.Windows-没有此类名称空间)

There is no 'ResourceReader' class (There is no ResourceReader class in System.Resource namespace) 没有“ ResourceReader”类(System.Resource命名空间中没有ResourceReader类)

I'm reading stackoverflow tips, but they are all not working in my case. 我正在阅读stackoverflow提示,但在我的情况下它们都无法正常工作。

How to read embedded resource text file 如何读取嵌入式资源文本文件

And had references to the assemblies you need in case you can't find that added to the project already. 并且已经引用了所需的程序集,以防您找不到已添加到项目中的程序集。

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

相关问题 如何在项目浏览器中的“读取,写入”中访问文本文件,该文件不在Windows Phone 7的独立存储中? - How can I access a text file in the project explorer “read, write” which is not in the isolated storage in Windows Phone 7? 如何使用 c# 在 pdf 文件中读取手动添加的文本? - How to read manually added text within a pdf file with c#? 如何运行在项目中添加的exe - How to run an exe which is added in the project 如何写入位于项目目录中的文本文件? - How to write to text file which is situated into project directory? 如何从不包含数据的文本文件中读取? - How to read from a text file which does not have consisted data? 如何在Xamarin Forms PCL项目上阅读文本文件? - How to read a text file on Xamarin Forms PCL project? 如何读取项目根目录中的文本文件? - How to read a text file in project's root directory? 使用C#,如何访问资源文件(.resx)并从添加到其中的文本文件读取? - Using C#, How to access to a resource file (.resx) and read from a text file added to it? 我无法写入添加到项目中的 txt 文件 - I can't write to txt file which is added into project 如何比较两个文本并确定添加了哪些单词以及删除了哪些单词 - How to compare two text and identify which words are added and which are removed
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM