Hi how do i publish the files from my bin folder using clickonce?
i successfully copied a folder of .sql script to the bin folder using the Build Events xcopy "$(ProjectDir)\..\project.Sql\AlterProductionServer" "$(TargetDir)\AlterProductionServer" /i /y
My purpose for doing that is to ask the system to check for any database script changes on startup. The system will check the scripts from the bin folder. The reason i xcopy to the bin so that when deploy, my client pc will read it from the same location too. If found, then it will run the .sql scripts to update the database first before running the system.
However, when i clicked on Publish - > Application Files, i do not see the AlterProductionServer folder which contain .sql files that i have already copied to the bin appear f开发者_JAVA百科or me to choose to Include
.
please advice.
When publishing via ClickOnce from within the Visual Studio IDE, it will only offer files from the project/solution, not from the file system. You could add your .sql file to the project, set the build action to Content
and specify that it be copied to the output directory. This removes the need for your xcopy build action and makes VS aware of the importance of the file.
If it will still not show in the Application Files section after a rebuild, you may have to look at the prospect of writing your own application/deployment manifest files (XML) and using the command-line ClickOnce utilities to publish your solution. I found this was necessary when including items in my ClickOnce distribution which were not dependencies of the main project.
精彩评论