为什么要加,MSDN上明明说的可以是相对路径,况且System.Window命名空间中的Applistation并没有StartPath属性啊。
解决方案 »
- 套接字通信问题!救命用
- 编译器错误信息: CS0021: 无法将带 [] 的索引应用于“System.Data.DataTable”类型的表达式
- 数组组合
- C# BaseDao的用法
- c#如何判断当前操作系统和ie版本?
- 求教:C#中如何对文本文件的数据进行修改操作
- [源代码]Richtextbox的扩展功能说明
- 我注册MSDART.DLL时 提示 已加载E:\BESOFT\BE-SDH\MSDART.DLL但没有找到DLLREGISTSERVER输入点,无法注册这个文件,请问是怎么回事~~~急
- 泛2级域名登陆与注销疑问..在线等
- WinForm 有没有类似 WebForm 的 RequiredFieldValidat 控件?
- 弱弱的问一句。。。。。textbox里面的值能不能是int型的
- 用C#开发Windows服务怎么锁定计算机
* None: 此文件不参与编译也不被输出。比如:工程中的文档文件, readme.txt。* Compile: 参与编译并输出。主要是代码文件。* Content: 不参与编译,但会被输出。* Embedded Resource: 此文件被嵌入到主工程生成的DLL或exe中。主要是资源文件。* ApplicationDefinition: 和Page类似,但只用于Silverlight的启动页面(默认是App.xaml)。* Page: Silverligh中所有的usercontrol/page/childwindow xaml都属于"Page” build,其它的build action不能将code behind文件和xaml文件连接起来。* CodeAnalysisDictionary: 自定义的CodeAnalysis字典。(参考http://blogs.msdn.com/b/codeanalysis/archive/2007/08/20/new-for-visual-studio-2008-custom-dictionaries.aspx)* Resource:embeds the file in a shared (by all files in the assembly with similar setting) assembly manifest resource named AppName.g.resources* SplashScreen: Silverlight的欢迎界面。* DesignData: Sample data types will be created as faux types. Use this Build Action when the sample data types are not creatable or have read-only properties that you want to defined sample data values for.* DesignDataWithDesignTimeCreatableTypes: Sample data types will be created using the types defined in the sample data file. Use this Build Action when the sample data types are creatable using their default empty constructor.* EntityDeploy: 适用于Entity框架。
此处相对的目录是bin\debug文件夹,你要看你的debug文件内有没有这个txt文件
此处相对的目录是bin\debug文件夹,你要看你的debug文件内有没有这个txt文件
我恰恰要问的是,txt文件为什么不应该作为资源文件,却要将它将它设置成Content呢?作为资源文件,就嵌入到了程序集中,恐怕更应该访问到的吧
2:按照你说的,设置为"嵌入的资源",并设置"复制",也确实能找到文件,这又是什么原因呢?设置为"Resource"和"嵌入的资源"又有什么不同呢,二者不都是把文件编译到程序集中去的吗?