I publish my application from project properties of visual studio and i set the update-path to one of my local drivers E:\WebSiteupdate. The update must run before application starts but i do not really know what should i put on E:\WebSiteupdate to update the application.
here what i used to do for update:
another publish from new application
copy all of new publish folder in E:\WebSiteupdate
but nothing happened and still show old program
what kind of files should i put on update path for update application?
Clickonce's auto updates are meant to update installed applications. That has nothing to do with the project run from VS. When you set Update location, each time the app launches it will check for a newer build/publish in that location. If there is a different build, it will automatically update your installed app. To answer your question what kind of files...? Its is the same contents that you get while you publish your app.
To try this:
Set your Upload location(Project properties --> Updates...) to a path accessible from your pc.
Publish your app to a different location lets say D:\Publish\
Install the app in your pc. There should be D:\Publish\setup.exe. Double-clicking that will install. This will put a shortcut menu in the start menu.
Make any minor change in the UI of your project (in VS).
After clearing the contents in D:\Publish do another publish.
Clear the contents from the Update location and copy over the contents from D:\Publish.
Now (don't do another install) close (if already open) and open the app again (shortcut should be present in Start menu)
The app should update automatically before opening. This is how we are expected to give app updates to the clients. Further, if you like to automate this I found the below link by deadlydog very helpful: http://blog.danskingdom.com/continuously-deploy-your-clickonce-application-from-your-build-server/
Related
Hi i'm new in Windows Service c#. i followed tutorials and it works perfectly after installation.
Now my problem is when i modify the fonctionnality of the service (modifying c# code), and i uninstall & install the windows service, the functionnality remains that of the first installation.
I even restarted the PC and the functionnality and the functionality has not changed
Is there someone who had this problem?
I also had the same problem.If you are using visual studio installer, just delete the .msi and setup.exe from "XXX\Release" folder and rebuild visual studio installer project. It will recreate both files with updated code changes.
Right click solution > rebuild. Then run your service again.
In order run the updated service in Windows which is created in c# follow below steps
First of all stop that service in windows service manager (services.msc)
Then go to build menu in Visual Studio and click on Rebuild Solution
Then go to services and start the service again.
In this way the updated service will run if it is build successfully and the service is created accurately otherwise you will get Service Failure alert in Windows with specific error code.
I had the same issue and the solution I tried is different from the marked answer.
Right click the setup project (you get a popup window). Click Configuration Manager button at top right, from Active solution configuration dropdown, check whether the selected value is Release. If it is Release then Release folder is updated on building the project; else Debug folder.
Hope this will help a few having such an issue.
Just had 2 questions.
1) I am writing a simple program in C# just to test out how to set up updating, However the program automatically updates ( I am using ClickOnce) and I was wondering is there any way to prompt the user to update?
2) I am publishing my project to a localhost, and I have published it about five times (v 1_0_0_1 - 1_0_0_5) and the folders are stored as such, however, when I publish, it changes ALL of the different versions, not just the latest one. I am trying to allow version control where I can allow a user to go back to a previous version.
Thanks in advance!!!
After the user installs your app for the first time, every time after that when the application is started it will check for an update. If there is an update it will ask the user if they want to update to that version.
This happens by default and you can even prevent them from opening the application if they select not to update. (Preventing the program from opening if the user does not update is not the default configuration but can be set in the publishing wizard or properties of the application)
Also you should know that publishing the application will not cause you to lose or overwrite all of your previous deployed versions. They are all still there under root/Application Files. You will see the latest version though because the app will look at the manafest file and that will tell the app which version to run. If you wanted to push out a later version you would change the manifest to point to that version.
However, a single user will not be able to choose which version they want. Once they choose to update they will be on that version until you push out a different one. This is for security and compatibility so that your users are on the same version once they choose to update and you don't have a bunch of different people running different versions whenever they feel like it!
I want to seperate one project from my main winform project, then "publish" it or something so that i will be able to click a button and the application will run, instead of running visual C# expresss and then run the project.
How do I achieve that?
It's not really clear what you mean, but just building your Windows Forms application will create a .exe file - you can copy that (along with any DLLs it requires) to another machine which has the appropriate .NET framework on, and then just double-click on the executable to launch it. (You can copy it to elsewhere on the same machine as well, of course.)
You certainly can create "setup" projects to bundle everything into an installer, but for simple needs copying a file would be fine. You don't need to launch it through Visual Studio.
When you compile your application as Windows app, it is executable out of VS environment. Just change the properites of the project.
And what do you mean click a button? From desktop, you need to double/single click the application from its directory to launch it.
Again qs is not clear.
In Project Properties under Publishing in Options there is a tab called "File Associations". I have entered there .mpg|MyDesc|MyDescID|myIco.ico. I have hoped that the mpg ext will be automatically associated after I start program. However it did not happen. Even when I choose open with and set the app as default it does not have the icon I have chosen.
How to use it?
I believe I have to create a published version, but I would rather not do it(since I change the app a lot). Is there any way to create the associations without creating an installer?
I believe this has to do with ClickOnce deployment, and is related to file associations when a user decides to install the ClickOnce bundle for your app.
When you say "start" the program - are you referring to F5 or Ctrl+F5? If you "Publish" your ClickOnce bundle and then install from there, I believe your file associations should work.
I have a C# application that I'm trying to get to update automatically via ClickOnce. After publishing newer versions of software, I see the new versions in my publish folder, but when I open the application, it checks for updates, and does nothing (even though there are new files in the publish folder).
What do I need in place for updates to be made automatically?
Edit
What version of Visual Studio are you using?
Visual Studio 2008
Are you deploying the upgrades to the same location as the old version?
They are being published to the same location (not sure about deployed)
Is the installation URL the same? Have you incremented the version number?
Yes
In the Updates dialog reached by clicking the Updates button in the Publish page, do you have "The application should check for updates" checked?
Yes
Do you have "Before the application starts" selected?
Yes
How are you deploying the files?
Not sure
Are you copying them over to the file share or publishing the directly?
Publishing directly
What version of Visual Studio are you using?
Are you deploying the upgrades to the same location as the old version?
Is the installation URL the same? Have you incremented the version number?
In the Updates dialog reached by clicking the Updates button in the Publish page, do you have "The application should check for updates" checked?
Do you have "Before the application starts" selected?
How are you deploying the files?
Are you copying them over to the file share or publishing the directly?
If you are copying them over there, are you also copying the deployment manifest (whatever.application) for that version to the top of the deployment folder structure?
This is the file that indicates which version should be installed. If you are using VS2008/2010, there is a copy of each version's deployment manifest in each versioned folder (yourapp_a_b_c_d) that you can copy to the root if you are deploying manually.
This is where it gets a bit trial and error, since it seems like you're correctly configured. So it must be something to do with your environment.
Is the publish URL different from that which you initially installed it?
This is particularly pertinent if you're talking about this behaviour on your local dev machine whereby you probably first ran from a different location. Such that it'll keep looking for updates in the initial activation path. Suggest trying a full uninstall/reinstall and see if it persists... You could test by looking at ApplicationDeployment.CurrentDeployment.ActivationUri.
If worst comes to absolute worst, then maybe manually check and run updates?
Useful links:
http://msdn.microsoft.com/en-us/library/s22azw1e.aspx
http://bloggingabout.net/blogs/dennis/archive/2007/11/05/manual-check-for-updates-with-clickonce.aspx