高兴啊。。。。。。。。。。。。。下面是所有步骤。研究了一上午终于搞定!
in this step we will build the application to auto-update. if you want, you can substitute in your own application here. you can also use the pre-built sample application included in the samples\sampleapp\sampleapp directory of the zip file. however for the purpose of proving that there isn’t anything special about sampleapp, we’ll walk through its creation. 【相关文章:难的函数指针说明】 step 1: build the application to update 【扩展阅读:Design Concepts with】 1. use visual studio .net to create a new windows application project, name it “sampleapp”. 【扩展信息:一个常见的栈、队列问题】 2. give the form an interesting background color of your choice. we will be using background color to differentiate between versions later. 3. now let’s add a tiny bit of functionality to this application in the form of a button that opens a form residing in a separate assembly. first add a button to your form. the zip file contains an assembly with a simple windows form in it. add a reference to the samples\sampleapp\simpleform assembly in the zip. then add two lines of code to your button event handler: simpleform.form1 f = new simpleform.form1(); f.show(); 4. switch your build flag to build release instead of debug. this will allow us to avoid pdb file locking problems later when we build a new version of the application while the original copy is still running. 5. build and test your application. it should look similar to the samples\sampleapp\sampleapp in the zip file. step 2: add the .net application updater component in this step we will add the .net application updater component to sampleapp. 1. in the components tab of the visual studio .net toolbox, right click and select ‘customize toolbox’. select the ‘.net framework components’ tab. browse and select the appupdater.dll in the appupdater project included in the zip. click ok. 2. an appupdater icon should now show up at the bottom of the list of components in the toolbox. drag and drop the appupdater component onto the sampleapp form. an appupdater1 instance of the .net application updater component should be instantiated and appear below the form. step 3: configure the .net application updater component in this step we will configure the .net application updater component. to do this, select the appupdater1 component and open its properties. the following section contains a description of each property and what value to set it to. note that you only need to change the first four properties for this example, for the rest, the defaults are adequate. appupdater properties – these are the core properties of the .net application updater and will need to be set for this application as follows:property name
description autofileload this controls the on-demand download feature described later, for now set this to true. changedetectionmode ... 下一页