I am doing a POC to migrate from our current choco nightmare, but obviously don’t want to change our packages yet. With that in mind our nuget packages contain various scripts and a zip file which contains all the artifacts for our package.
The app I am looking at is a windows service built with topshelf and I am using an offline package drop deployment. I have also created a tenant and associated the tenant with this project. The project has a variable template modelling the appsettings.json and I’ve populate the values for my tenant.
I’m using the windows service step template, and have a custom pre deploy script in it to unzip the contents of serivces.zip to the route with the following command:
expand-archive -path .\tools\service.zip -destinationpath .\
This works fine and I get all the files where I expect them to be in the package folder and in the install directory I’ve set.
The problem I am having is the variable replacement is not happening. I’ve also tried manually manipulating the package so my appsettings.json is in the route to begin with, to rule out the json variable replacement happening too soon in the process.
I’ve tried various patterns and fixed paths to the appsettings from just appsettings.json to wildcards like **\appsetings.json, to full paths of both the package directory and install directory, to no avail.
Can you help?