Why doesn't ClickOnce in Visual Studio deploy content files from dependent assemblies?

Visual Studio 2010 Deployment Project

  • I have a simple application that I deploy with a VS2010 Deployment project. However, the application is behaving weirdly in the wild. The application is a simple .NET executable. Along with the exe, I also ship a number of text files that contain SQL queries. The application reads these files, and executes the queries. Not all customers need all the queries, so customers delete the files that they don't need. After they delete the files they don't need, the installer is putting the files back the very next time that they run the application. It doesn't matter if they click the shortcut that the installer places on the desktop or they double-click the EXE directly. The installer launches and replaces the missing files. I don't want this behavior but have had no luck in my research to try and figure out to disable it. How can I do this? Moving to another deployment platform (e.g. Installshield) is not really an option at this time.

  • Answer:

    Your are deploying a http://msdn.microsoft.com/en-us/magazine/cc163917.aspx app. What is to prevent the sql content from being modified by an end user? - I suggest you implement the sql as stored procedures. This addresses both security and deployment. - Barring that, make the files http://msdn.microsoft.com/en-us/library/vstudio/e2c9s1d7(v=vs.100).aspx in your project. They'd be compiled into the exe and not show up on disk at all.

DWRoelands at Ask.Metafilter.Com Visit the source

Was this solution helpful to you?

Other answers

Are the SQL text listed as 'Application files' and do you have the .NET auto-update functionality turned on? I'd wager that the .NET update program notices these files are missing and re-downloads them upon launch.

Setec Astronomy

Are the SQL text listed as 'Application files' and do you have the .NET auto-update functionality turned on? Can you tell me where specifically to look for the auto-update functionality item?

DWRoelands

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.