[英]How to merge a text file and embed it in C# code build
我创建了一个 class 库并添加了一个文本文件作为项目的资源之一。 我这样使用它:
string commandFile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"data\vaCommands.txt");
当我发布此 dll 时,我不希望此文本文件 (data\vaCommands.txt) 对用户可见。 有没有办法把它编译成代码? 在这些情况下最好的方法是什么?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.