×
Back to book

Sharing your C# repository with a Zip file

This guide will run you through the essentials of zipping up your C#Bot repository. To reduce the size of the zip file it is important for you to only package what is necessary. For that reason, external dependencies are excluded from the package as they can be installed by developers manually after unpacking.

This guide uses the Fishnatics project as an example.

Prerequisites

  • Software is installed to create zipped files (7zip, winrar)
  • On MacOS, no software is required

Creating Your Zip File

  1. Create a new folder to store our zipped content in (i.e. fishnatics-zip).

  2. With the exception of the clientside folder, copy all folders into the folder you created in step 1. Your folder should look like the following:

     fishantics-zip
         domain
         models
         serverside
         testtarget
         .gitignore
         docker-compose.yml
         global.json
         README.md
  3. Create a new empty clientside folder in this directory

  4. With the exception of the node_modules folder, copy all of the files inside your clientside folder into the new empty clientside folder you created in step 3.

    Your clientside folder should look like this:

    
     fishantics-zip
         clientside
             docs
             public
             src
             .gitignore
             .project
             images.d.ts
             jest.config.js
             package.json
             styleguide.config.js
             tsconfig.json
             tscongi.prod.json
             tsconfig.test.json
             tslint.json
             yarn.lock
         domain
         models
         serverside
         testtarget
         .gitignore
         docker-compose.yml
         global.json
         README.md
  5. Navigate back to the root folder and zip it using your zipping program. For information on how to do that, look at your program's instructions. Typically though, it can be done by right-clicking on the folder you want to zip and choosing the appropriate option. 7-Zip was used in the below example:

    On MacOS, you can right-click on the folder and select the compress option (without any third-party app)

  6. You will now have a zipped file to do with as you please

More Options

If you wish to reduce the size of the zip even further, you can go into the following C#Bot folders and remove the bin and obj folders (if they are present):

  • \serverside\src
  • \testtarget\API
  • \testtarget\Selenium
  • \testtarget\Serverside
  • \testtarget\TestDataLib

Once this has been done you can re-zip your application starting from step 5.