OctoPack Not Packaging Web.<Environment Name>.Config

Hi there,

I have included

  • Web.Development.config
  • Web.UAT.config and
  • Web.Production.config

in my solution, corresponding to each of the environments that I wish to deploy to with transformations relating to each of these environments.

I can see all of the additional (per-environment) configs are included when I get the project from source control.

My build command looks like:

"C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe" "%WORKSPACE%\ClientWebsites\Explorer\Explorer2015\Explorer2015.sln" /t:Build /p:RunOctoPack=true  /p:VisualStudioVersion=14.0 /p:OctoPackPackageVersion=%SVN_REVISION%.%BUILD_NUMBER% /p:OctoPackEnforceAddingFiles=True /p:OctoPackProjectName=Website.Explorer.Explorer2015 /p:OctoPackPublishPackageToHttp=http://localhost:80/nuget/packages /p:OctoPackPublishApiKey=%OctopusApiKey%

However, the nuget package that is built does not include any of these additional per-environment configurations.

Anyone know why this might be happening?

OctoPack version is 3.6.1.

Thanks,

Sean

Ah, this may because I had the ‘Build Action’ property on each of my per-environment Web.config files set to ‘None’, where it is ‘Content’ for all of the other Web.config files.

Hold tight…

Yup it’s because of That property not being set to “content”

Holding tight…

That worked alright!

Additional (per-environment) config files being copied over and transformed!

Thanks for your help!