Trying to octopack 1 windows service project in a solution with multiple other projects

Hi, guys!

Things I did:

1)Added octopack to only windows service project in a solution I want to octopack

2)MSBUILD

/p:OctoPackConsoleApp=true /p:OctoPackPublishPackageToHttp=http://x.xx.xx.x/Octopus/nuget/packages /p:OctoPackPublishApiKey=API-xxxxxxxxxxxxxxxxxxx

3)I triggered the build in TFS, the build finishes with success, although octopack is never found on octopus server.

  1. I tried your solution in below discussion

http://help.octopusdeploy.com/discussions/questions/727-octopacking-1-project-in-a-solution-with-multiple-octopack-enabled-projects

modify the .csproj files to do something like:

true

added /p:OctoPackConsoleApp=true to msbuild argument.

But still not working.

Hi,

Thanks for reaching out! First of all, lets try to solve this without the workaround you added in (4). So please as a first step, remove those changes you made to the .csproj file.

This is most likely happening because not all the changes to the csproj file were commited when you initially added Octopack to your solution. If the below snippet is missing from your .csproj file, then that’ll confirm my theory:

 <Import Project="..\packages\OctoPack.3.5.2\build\OctoPack.targets" Condition="Exists('..\packages\OctoPack.3.5.2\build\OctoPack.targets')" />
  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
    <PropertyGroup>
      <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
    </PropertyGroup>
    <Error Condition="!Exists('..\packages\OctoPack.3.5.2\build\OctoPack.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\OctoPack.3.5.2\build\OctoPack.targets'))" />
  </Target>

If this is the case, please uninstall Octopack from your solution and re-install it, but this time commit all the files added/changes to source control.

If the above doesn’t help, please send me your full build log and your .csproj file. You might wanna set this conversation as Private from the panel at the right of this page so only you and our staff can see the contents of your files.

Best regards,
Dalmiro

Hi Dalmiro,

The issue is resolved. the problem is with my TFS build definition . The build finishes success but binaries are not created in bin folder on build server. Since they are no binaries octopack is never created. Once I fixed the build definition configuration and binaries are created in bin folder I saw octopack for the project.

Thanks Appreciate your response!!