Multiple MSBuild Octopack parameters not working

Hi Octopus team,

I’m trying to use these 2 parameters /p:OctoPackEnforceAddingFiles=true /p:OctoPackProjectName=%projectCode%.Website but “/p:OctoPackProjectName” is blocking “/p:OctoPackEnforceAddingFiles=true”.

As soon as I remove “/p:OctoPackProjectName”, “/p:OctoPackEnforceAddingFiles=true” works and I need to have both, any suggestions ?

BTW I’m using Octopus 3.4.11.

Am I missing something here ?

Thanks,
Ale

Hi Ale,

Thanks for getting in touch! Could you try changing the value of the parameter /p:OctoPackProjectName=%projectCode%.Website to include a double quote?
E.G.
/p:OctoPackProjectName="%projectCode%.Website"

If that does not work, would you be able to replace the value with a different project name? One without a dot and without a variable. Then let me know the result.

Looking forward to hearing from you. :slight_smile:

Regards,
Daniel

Hi Daniel,

I’ve tried your suggestions but none of them work, I’m getting the same behavior.
I can use the “Append to package ID:” option in Teamcity to do what I’m trying to do (Hard code the id in the nuspec file as “Workshop” then use the property to append what I want e.g. “.%projectCode%.Website” ), but this seems like a bug.

Any other ideas ?
Do you need more info from my side to to fix this ? I’m happy to help.

Thanks,
Ale

Hi Ale,

Could you get us the build logs where it fails? That should give us a lot more information on why it is failing.
I tried it on my machine and it seemed to work fine, however i did not try it with the %projectCode% variable.

I also wanted to double check that you have read the information on the /p:OctoPackProjectName command in our docs.

Use this parameter to override the name of your package so its not necessarily identical to your Visual Studio Project. This will only work when building a single Project/Package. For multiple projects you do not use this parameter and instead set the below property on your project's csproj file
<PropertyGroup>
    <OctoPackProjectName>Foo</OctoPackProjectName>
</PropertyGroup>

Looking forward to hearing from you. :slight_smile:

Best regards,
Daniel

Hi Daniel,

I’m doing a CI and CD workshop this Friday and I don’t want to touch the demo project right now but as soon as I finish with the workshop, I’ll send you all the logs.

I managed to get it working with the “Append to package ID:” property, so now the final name is:

Workshop.ProjectXX.Website

Thanks,
Ale

Hi Ale,

Good to hear that you managed to get it working!
Let me know when you get the logs and we can look to see what is going on there. :slight_smile:

Best regards,
Daniel