Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > SSCE VB.net Clickonce deployment
 

SSCE VB.net Clickonce deployment

Is there a way to clickoncedeploy a vb.net app andthe ssce db file it useswithout overwritting my ssce db updates after the initial deployment? During the clickonce deploymentthe db is put into the data directory of that release of software and that is fine for the intial deployment. What I would like is to have the db file copied from the local data directory of the previous install into the the data directory of the latest deployment versus having the db file copied down again. I could use one more option off the "copy to output directory"properties off the .sdf file. That option should be "Migrate from last data directory if available". If your going to tell me to use a bootstrapper then please tell me where to find some useful information on clickonce and bootstrapper.
manofhowell  Tuesday, January 22, 2008 11:51 AM

Hi manofhowell,

You can mark the Publish Status of the database file as Data File in the Application Files Dialog to avoid this file from being updated. Try the following steps:

1. Right click your project in the Solution Explorer and choose Properties

2. Select the Publish tab and click Application files.. button

3. In the Application Files Dialog, mark the Publish Status of your database file as Data File (Auto)

4. Publish your application

Hope this helps.
Best regards.
Rong-Chun Zhang

Rong-Chun Zhang  Monday, January 28, 2008 11:30 AM
There are other ways to handle this. When you do change the database, it puts hte previous version in a subfolder of the datafolder, called .\pre I think. So you can copy it forward or something like that. Or better yet, put the database in a completely different folder altogether, removing any chance of ClickOnce updates messing it up.

Here is a thread that I posted to that has two links that discuss those two subjects. This should get you to where you want to go:

http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/c8c55be6-be34-47cf-93fc-6cc0bf97f2cf

RobinDotNet

Click here to visit my ClickOnce blog!
RobinDotNet  Monday, August 31, 2009 3:30 AM

Hi manofhowell,

ClickOnce uses file patching technique to avoid redundant downloading of application files. It compares the hash signatures of file to decide whether to download this file. The reason why your client downloads all files is you use Visual Studio to compile your application; it will generate new hash signatures for all files in your project. Try to compile it manually in Visual Studio 2005 Command Prompt, something like the following:

Code Snippet
csc /target:exe …�
vbc /target:library …�/font>

For more information, check this following article.
http://msdn2.microsoft.com/en-us/library/ms404267.aspx

Hope this helps.
Best regards.
Rong-Chun Zhang

Rong-Chun Zhang  Friday, January 25, 2008 8:02 AM

Thanks I wondered how that worked but that wasn't exactly what I was looking for.

I bought a book on clickonce deployment and it describes how the data is copied over to the |data|\.pre data directory for new releases,I think I can take advantage of that feature to migrate my existing SSCEdb to the new data directory created when my app starts up the first time after deployment.I noticed that when Iclickonce from my test serverto the same workstation that I compiledontheclickonce install doesnot create the .pre directory. It seems tocreate the |data|\.preon my other test machine. Is that another feature?

manofhowell  Friday, January 25, 2008 3:27 PM

Hi manofhowell,

You can mark the Publish Status of the database file as Data File in the Application Files Dialog to avoid this file from being updated. Try the following steps:

1. Right click your project in the Solution Explorer and choose Properties

2. Select the Publish tab and click Application files.. button

3. In the Application Files Dialog, mark the Publish Status of your database file as Data File (Auto)

4. Publish your application

Hope this helps.
Best regards.
Rong-Chun Zhang

Rong-Chun Zhang  Monday, January 28, 2008 11:30 AM
Hi Rong-Chun Zhang,

the data file(with records)exist in the client-pcwill still replaced by the new released data file(empty records)if something changes to the datafile. u get wat i mean?
setting the publish status to "datafile (auto)" is not a secure way.. just my 2 cent.

Chiefmega  Friday, August 14, 2009 5:52 AM
no asnwer still? else i will consider installshield instead of clickonce then.
Chiefmega  Tuesday, August 25, 2009 8:11 AM
There are other ways to handle this. When you do change the database, it puts hte previous version in a subfolder of the datafolder, called .\pre I think. So you can copy it forward or something like that. Or better yet, put the database in a completely different folder altogether, removing any chance of ClickOnce updates messing it up.

Here is a thread that I posted to that has two links that discuss those two subjects. This should get you to where you want to go:

http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/c8c55be6-be34-47cf-93fc-6cc0bf97f2cf

RobinDotNet

Click here to visit my ClickOnce blog!
RobinDotNet  Monday, August 31, 2009 3:30 AM
Hi RobinDotNet, thanks a lot.
Chiefmega  Wednesday, September 16, 2009 2:14 AM

You can use google to search for other answers

Custom Search

More Threads

• Deployment of Project with out SQl server.
• Challenging ClickOnce problem... can't write to the data store
• ClickOnce Processor Architecture Change Breaks Deployment
• Get resource file inside the application...
• Click Once Update and Site Minder
• the manifest may not be valid or the file could not be opened
• Automated upgrades for ClickOnce Application that is never closed by user
• Unable to build a Setup and Deployment Project
• Problem when publishing to my website.
• Unable to run click-once application every once in awhile.