My build:
- Build with msbuild (/t: build)
- Publish with msbuild (/t: publish)
- Package with nuget
- Deploy with octopus
produces an artifact (nuget package) that contains the following files:
- Azure.ccproj.cspkg
- ServiceConfiguration.Production.csfg
- Web.config (which will be transformed during deployment via Octopus)
The cspkg is a valid, deployable package. The problem is that it contains a web.config that is pre-transform because the transform occurs at deployment time. See the Octopus documentation for transforms and variable substitution for reference.
How do I overwrite the web.config inside the cspkg with the transformed web.config that resides in the deployment package?
I have powershell and the full .net framework at my disposal.
Alternatively, if it makes more sense to unpack the cspkg, overwrite the file and then re-package, I consider that acceptable. I am not sure how to do that either.
I know that Save-AzureServiceProjectPackage exists but I cannot get it to run and the documentation is lacking.