OctoPack 3.0.33 changes html file encoding to UTF-16

We use Team City with OctoPack 3.0.33 and we have realized that the OctoPack step is changing the encoding of html files to UTF-16 which is causing other issues.

Is it possible to tell Octopack to NOT change the encoding?


Hi Javier,

Thanks for getting in touch! OctoPack does not do anything special. It calls NuGet.exe and packages up the files from MSBuild.
However you can specify the encoding in a NuSpec file. Do you have your own NuSpec defined or is Octopack creating one? Is this something you could show us and or attach.
Another place to look would be on your TeamCity work directory to see what encoding the files are in.

Please let me know what you find.

Hi Vanessa,

Thanks a lot for your reply. We are not creating any NuSpec files, we just use the Octopack 3.0.33 on our solution and configure Team City to run OctoPack after the build.

Is there a way in a NuSpec file to specify the encoding for all html files (something like *.html) without having to add them one by one?

In the TeamCity working directory the encoding is ANSI before the RUN OctoPack step, then the encoding is UCS-2

Any suggestions will be greatly appreciated!

Kind regards

In the .nuspec file you can specify wildcards for files:

here is a reference to the nuspec file contents.
As a matter of practice, I always create a nuspec file for my projects so that I can govern what gets included and with the Pre/Deploy/PostDeploy.ps1 scripts I can dictate exactly what is going to happen with my package and its files.