1.将资源文件的属性改成“嵌入资源”
2.
1 string assembleName = this.GetType().Assembly.GetName().Name;//本程序集名2 Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(string.Format("{0}.{1}", assembleName, xmlPath));//获取嵌入资源生成流,XMLPATH为嵌入资源路径,资源名称访问路径为:assemblename.文件夹名.资源名3 XmlTextReader reader = new XmlTextReader(stream);