Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > datadirectory and vb .net
 

datadirectory and vb .net

Hi guys,

Sorry for my stupid questions.

I want to use Clickonce to deploy my vb .net application.

Besides the exe, I need to deploy some files for it touse e.g. help file, xsd ...

I search around the net and found that I need to select these files as "data file" and they should deploy to the client's pc's "Datadirectory".

However,how can I get the path of these files? (so i can reference them and check whether it works or not?)

Yu Chai  Friday, January 27, 2006 6:05 AM

OK

First of all inorder to add them as data files, you adds them to the solution then goes to the publish screen click on application files and then change the publish status of those files to data files

Then inorder to access them from within the application here is the code:

Application.UserAppDataPath

The rest of the path is similar to the path in your solution

Itzik Katzav

Itzik Katzav  Friday, January 27, 2006 6:41 PM

OK

First of all inorder to add them as data files, you adds them to the solution then goes to the publish screen click on application files and then change the publish status of those files to data files

Then inorder to access them from within the application here is the code:

Application.UserAppDataPath

The rest of the path is similar to the path in your solution

Itzik Katzav

Itzik Katzav  Friday, January 27, 2006 6:41 PM

From you application you can use the DataDirectory property to access the data dir.

Please see http://msdn2.microsoft.com/en-us/library/system.deployment.application.applicationdeployment.datadirectory.aspx

System.Deployment.Application.ApplicationDeployment.CurrentDeployment.DataDirectory will give you the path to the data directroy from within your application. This property does not work in partial trust.

Thanks,
Sameer

Sameer Murudkar - MSFT  Saturday, January 28, 2006 7:14 PM

You can use google to search for other answers

Custom Search

More Threads

• Unable to find dependency 'MICROSOFT.APPLICATIONBLOCKS' (Signature='(null)' Version='2.0.0.0') of assembly xyz.dll
• deploy .net 3.5 redistributable with clickonce
• Urgent: Rollback Uinstallation
• Help with vbscript during install..."A script required..." error calling batch file
• Hiding the Restart dialog box of 3rd party package(setup.exe, may be built from InstallShield)
• Different name for the same ClickOnce publish
• access folder path in installer class
• Deployment from a website
• Localized Resource File not automatically included in Setup / Deployment project
• Custom action data ShowDialog window going back of the installer screen