Octopack Pusing the wrong package to OctoDeploy

Hi Everyone,

I have a multi project Solution where I have a DAL project referenced in my main Website Project.

I have a nuspec file as below in my main WebProject.

<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
  <metadata>
    <id>Gemini.Web</id>
    <title>Gemini</title>
    <version>1.0.0</version>
    <authors>Phill</authors>
    <owners>Phill</owners>
        <description>The GeminiApplication</description>
    <releaseNotes>This release contains the following changes</releaseNotes>
       </metadata>
   </package>

But for some reason TFS sends the Gemini.DAL first which I don’t want it to! Here is my MSbuild argument string.

/p:RunOctoPack=true /p:OctoPackNuSpecFileName=Gemini.Web.nuspec /p:OctoPackEnforceAddingFiles=true /p:OctoPackPublishPackageToHttp=http://aries:880/nuget/packages /p:OctoPackPublishApiKey=API-XXXXX

If anyone cna provide pointers so that octopack doesn’t automatically create a package for the DAL that would be great!

Thanks,

Phill

Hi Phill,

Thanks for getting in touch! First of all, thanks for naming your project after me. Such an honor (People call me DAL)

If you want to avoid having Octopack create a build of Gemini.DAL, do the following:

  1. Open you solution > On the solution explorer, right click on the solution icon (top parent item) > Manage Nuget packages for solution
  2. On the installed packages, click con Octopack and click on Manage
  3. A window will pop-up showing you a tree view of your solution and the projects inside. Un-check the box of your project Gemini.DAL and click OK. Wait the the uninstaller to finish and close this window
  4. The change you just did modified a few settings on your solution, so check in your changes into source control and fire off another build.
    5-Optative) You can remove the param /p:OctoPackNuSpecFileName=Gemini.Web.nuspec as it will not have any effect on this context. Octopack will pack all the projects marked on the window seen on step 3, and if they dont have a nuspec, it will create one for them.

This new build should not create a package for Gemini.DAL.

Hope that helps!

Dalmiro

Hi Dal,

It’s almost as its meant to be!

I’ve followed your instructions to the letter, and even gone so far as to uninstall the Octopack entirely, yet it only compiles the DAL first.

Regards,

Phill

Hi Phill,

From your initial post I thought you just wanted to avoid having Octopack create a nuget package out of your project, not avoid its entire compilation. By uninstalling Octopack entirely and checking-in the changes to Source Control, your build should compile both projects, but just not create nuget packages out of them.

If what you want is to directly avoid the project compilation:

  1. Open the solution
  2. Click on Build on the top left corner of visual studio. Then open Configuration Manager
  3. On the Build column uncheck the projects that you dont want to compile. Close the window and check-in changes to source control.

Hope this is what you were looking for :slight_smile:

Dalmiro

Hi Dal,

Sorry by compile, I mean octopack only runs on the DAL project.

Not on the main project, sorry for the confusion !

Sent from my iPhone

Hi Phill

No worries! So after your change, it is now packing only the one project you didn’t want to pack? Is it possible you might have unchecked the wrong items?

On the attached screenshot I have a solution called OctopusConsole which has 2 projects on it: OctopusConsole & OctopusConsole2. If I want to uninstall Octopack from OctopusConsole2 to avoid creating a package out of it, that project should be the only one unchecked (as shown on the screenshot)

Sorry if that solution sounds a bit dumb, but its the most probable scenario since after your change it now only runs the DAL project.

Dalmiro

Hi,

Yeah I completely understand, got to cover all basis, but that is exactly the same as the screen I see! ( just with my projects)

I’ve tried looking into the .config and repository files buy can’t see any clear settings for octodeploy.

My final choice would be just start from scratch.

Thanks,

Phill

Looking further, it seems to be an issue with this argument.

/p:OctoPackPublishPackageToHttp=http://aries:880/nuget/packages

It seems to package both th projects, however removing that argument – it seems to work fine :slight_smile: and as expected.

Thanks,

Phill

Hi Dal,

I’ve found the issue, in the .proj file the uninstaller had not removed the following in order for it not to compile to octopack.

Removing those lines seemed to have worked :slight_smile: Thanks for all your help. !