Squirrel Installation
Squirrel Installation
Step 1: Integrating
1.1.Install required packages in the project
PM> Install-Package Squirrel.Windows
Here C:\\Projects\\MyApp\\Releases will be the path which squirrel will check for the update.
Step 2: Packaging
2.1.Building
2.1.1. Set Version - Set the initial application version in
Properties\AssemblyInfo.cs
[assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyFileVersion("1.0.0")]
2.2.5 Add Release Files - add all the files from bin\Release (You can
drag and drop also).
a. Exclude: *.vshost.*, *.pdb files
2.2.6 Save the NuGet Package File - save the NuGet package file to
your solution folder. Follow the given naming format (e.g.,
MyApp.1.0.0.nupkg).
2.3 Releasifying
IMP: After running the above command squirrel will create a new
“Release” folder in solution containing directory.
2.3.1. The realease folder now contains the setup file to install the
application. Simply open setup.msi to install the application.
2.3.2. Distribute the setup.msi to install the application in various
systems.
2.3.3. Creates a %LocalAppData%\MyApp directory for the “MyApp” to be
installed.
3.Updating
If you have a new version to be published(update), follow the below
step. It is similar to creating the installation package.
1. Update MyApp Version - update the application version.
Properties\AssemblyInfo.cs
[assembly: AssemblyVersion("1.0.1")]
[assembly: AssemblyFileVersion("1.0.1")]
2. Switch to Release - switch your build configuration to Release.
3. Build - build your application to ensure the latest changes are
included in the package we will be creating.
4. Open Previous NuGet Package - open the previous NuGet package you
created for “MyApp” version 1.0.0.
5. Update Version - update the version in the metadata.
6. Replace Release Files - replace the changed files under
lib\net45. You can simply drag and drop any program specific
files that have changed.
7. Save the NuGet Package File as New Version - use the "Save As..."
feature to save the new version of the package MyApp.1.0.1.nupkg.
8. Run the following command to releasify the package.
PM> Squirrel --releasify MyApp.1.0.1.nupkg
9. The Releases directory under solution directory now includes the updated files to
distribute to your users.
10. Copy all files from this release folder to the update location
which you are mentioned in the update function in your application.