简体   繁体   English

发布Vb.net应用程序时如何访问数据文件夹中的文件

[英]How can we access the files in the Data Folder when we publish the Vb.net application

I have added some files that I need to be downloaded to the Application start up path. 我已经添加了一些需要下载到应用程序启动路径的文件。 So I set Build Action as content now the files have been copied some where 所以我将“构建操作”设置为内容,现在文件已复制到某些位置

C:\\Documents and Settings\\TestUser.ANNAM\\Local Settings\\Apps\\2.0\\Data\\HVDRBMY5.8AA\\858AT9VM.TNP\\test..tion_2d7cfc137d9c2c74_0001.0013_432bd4561850d290\\Data C:\\ Documents and Settings \\ TestUser.ANNAM \\ Local Settings \\ Apps \\ 2.0 \\ Data \\ HVDRBMY5.8AA \\ 858AT9VM.TNP \\ test..tion_2d7cfc137d9c2c74_0001.0013_432bd4561850d290 \\ Data

How can access file from the application. 如何从应用程序访问文件。 My problem since it is a dynamic path will it be same folder count so that we can use like ....\\Data\\ Some think like this 我的问题是,因为它是动态路径,所以它的文件夹数是相同的,以便我们可以使用.... \\ Data \\这样的想法

您可以使用My.Application.Info.DirectoryPath这将返回存储应用程序的目录。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM