I have multiple projects in one Solution. Can I use multiple AppVeyor.yml files?

james.carter's Avatar

james.carter

08 Dec, 2014 06:41 PM

Hi, I've been using AppVeyor for approx. 6 months and love it. I want to polish some of my build procedures and bring these into AppVeyor too.

I have the following project structure:

- Root
  - Business Logic
  - Dal
  - Common
  - Web Project 1
  - Web Project 2
  - Azure Cloud Service (Hosts Web 1, Web 2)
  - Web Project 3 (Should push to Azure websites)

Currently I only publish the Azure Cloud Service, which publishes Web 1 and 2 to my Azure Worker Roles. This works very well, and I have followed the recommend way of having multiple branches/only yml configuration to build for test/production enviroments.

However I now want to package Web 3 as a Web Deploy Artifact so that I can publish this to my Azure Website. My issue is that if I enable publish_wap: true it attempts to package Web 1 and Web 2 as well, despite them not having an appveyor Publish profile.

Can I either have a specified appveyor.yml which I can select in my AppVeyor Project for each branch/build config, or can I someone specify which projects need to be built with publish_wap?

Thanks for your help.
James

  1. Support Staff 1 Posted by Feodor Fitsner on 08 Dec, 2014 10:51 PM

    Feodor Fitsner's Avatar

    Hi James,

    As a solution to this problem could be changing the way AppVeyor publishes WAP, i.e. we can do it as a separate msbuild call - one for each WAP. I think that would give us approx the same performance as projects are already compiled.

    So, in your case msbuild will be called 3 times: 1) build solution, 2) publish Azure CS project and 3) publish WAP.

    What do you think?

  2. Support Staff 2 Posted by Feodor Fitsner on 09 Dec, 2014 12:59 AM

    Feodor Fitsner's Avatar

    It's been implemented. Will deploy it this week: https://github.com/appveyor/ci/issues/81

  3. 3 Posted by james.carter on 09 Dec, 2014 05:31 PM

    james.carter's Avatar

    Thanks Feodor,

      My question was how I could prevent publish_wap from trying to build each and every Web Application, and just build/package the one I want.

      I have instead added it a after_build step:
      after_build:
        - msbuild Website/Website.csproj /t:Package /p:PackageLocation=Website.zip /p:PackageAsSingleFile=True /verbosity:minimal
        - appveyor PushArtifact Website/Website.zip

      However, when I try and push this to my Web Deploy environment, it simply extracts the Zip to the remote location, as in they are pushed to:
     Content/C_C/projects/projectname/websitename/obj/Debug/Package/PackageTmp/*.*
      Is this AppVeyor Web Deploy not behaving, or have I created the webdeploy package incorrectly in my postbuild step?

  4. Support Staff 4 Posted by Feodor Fitsner on 09 Dec, 2014 05:39 PM

    Feodor Fitsner's Avatar

    Yeah, you should specify this is Web Deploy package while pushing artifact:

    - appveyor PushArtifact Website/Website.zip -Type WebDeployPackage
    
  5. Support Staff 5 Posted by Feodor Fitsner on 09 Dec, 2014 05:40 PM

    Feodor Fitsner's Avatar

    Anyway, AppVeyor update coming up today will be correctly publishing both WAPs and Azure CSs in the same solution, so you don't need that custom step.

  6. 6 Posted by james.carter on 09 Dec, 2014 06:22 PM

    james.carter's Avatar

    Thanks Feodor,

      Using the -Type WebDeployPackage to publish my artifact worked. You probably want to add this to the Web Deploy documentation page (and correct spelling error in the push command).

      I look forward to seeing developments on publishing WAPs and CSs at the same time.

    Cheers,
    James

  7. Support Staff 7 Posted by Feodor Fitsner on 09 Dec, 2014 06:33 PM

    Feodor Fitsner's Avatar

    Thanks, it's been updated.

  8. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:50 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac