Octopus deploy not including exe.config in nuget

I am using dbup for my database migration and my dbup project in visual studio solution definitely produces required exe and exe.config file. Now when I deploy my project through octopus deploy I have no exe.confog file in nupkg generated by octo however I can confirm that exe.config is in the release folder on the server.

I found that octopus had a bug with similar issue https://github.com/OctopusDeploy/Issues/issues/970 which is resolved now. in version 2.5.1 (https://octopus.com/downloads/compare?from=2.2.1&to=3.4.10) and I am using octopus version 3.3.17 , however I am facing same behaviour… Can anyone please point me in the right direction?

Many thanks.

Hi @Jay,

Thanks for reaching out.

I take it from the github issue you linked that you are using Octopack to package your application. If that is the case, have you tried to set your config file as “Content” in your project? You can find how to do this in the “Including web application content files” section on this doc: http://docs.octopusdeploy.com/display/OD/Using+OctoPack

If that doesn’t work, please send us your csproj file, a build log (or your msbuild output and parameters) and the name of the missing file.

Thanks,
Dalmiro

Hi Dalmiro.

I have app.config’s build action set to content still same issue. I have attached the log file with this message.

Sorry cannot upload project file so have to copy here… my apologies

<?xml version="1.0" encoding="utf-8"?> Debug AnyCPU {2C75664A-8E22-4599-9166-455A0C7FC902} Exe Properties Data.Migration Data.Migration v4.5.2 512 true AnyCPU true full false bin\Debug\ DEBUG;TRACE prompt 4 AnyCPU pdbonly true bin\Release\ TRACE prompt 4 ..\packages\dbup.3.3.5\lib\net35\DbUp.dll PreserveNewest

Thanks,

Jay

Hi Jay,

See how your App.config line says <None Include="App.config">? When you switch the build action to be content and save that setting (and commit to source control), that line on the csproj file should change to <Content Include="App.config">.

Double check if those changes are being saved on the csproj once you make them from Visual studio. If they are not, just as a quick test manually the line mentioned above on the csproj and then try to build+package again. That way at least we’ll know there’s something funny in VS and not in Octopack.

Cheers,
Dalmiro

Hi Dalmiro,

I can confirm now that build action for App.config is set to content now.

but still facing same issue. I need to highlight that I have a VS solution with multiple projects and one of them is web api project and another project is for data migration using dbup. Data migration project is a console app and web api has dependencies on Data migration.

I am using following command in Bamboo build to produce nuget package

/p:Configuration=Release /p:RunOctoPack=true /p:OctoPackPackageVersion=${bamboo.majorVersion}.${bamboo.minorVersion}.${bamboo.buildNumber}${bamboo.inject.prereleaseTag} /p:OctoPackPublishPackageToHttp=http://sdcbdpcbm01:8088/nuget/packages?replace=true /p:OctoPackPublishApiKey=${bamboo.OctopusApiKey_Password}

Hi Jay,

Can you send me one of your build logs and also tell me which version of Octopack are you using?

It really should be enough to set that file as content and then save those changes in source control.

Just for the sake of testing on your end. Could you ale really quickly create a new solution with a console app, put Octopack on it and see if it gets packed as expected on your build server?

Regards,
Dalmiro