Updating Microsoft.Web.WebJobs.Publish NuGet package breaks build

nbierema's Avatar


02 Oct, 2018 03:42 PM

Updating Microsoft.Web.WebJobs.Publish from v1.1.0 to v2.0.0 causes the build to fail. I have a web project that has a web job as another project that is in the solution. My appveyor.yml build section looks like this:

    publish_wap: true
    project: server\TheSolution.sln
    verbosity: quiet
This update caused the build commands to change. It used to run like this:
msbuild "C:\projects\repository-hr0q3\server\TheSolution.sln" /verbosity:quiet /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
msbuild "C:\projects\repository-hr0q3\server\WebProject\WebProject.csproj" /p:Configuration="Release" /p:Platform="AnyCPU" /verbosity:quiet /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:DeployOnBuild=True /p:PublishProfile=appveyor
When I update the WebJobs NuGet package it causes some of the deployment flags to be moved from the project build to the solution build. This causes some errors when building the solution that weren't there in previous versions. Now the AppVeyor builds like this:
msbuild "C:\projects\repository-hr0q3\server\TheSolution.sln" /verbosity:quiet /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:DeployOnBuild=True /p:PublishProfile=appveyor
I now get errors when the solution is built:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Web\Microsoft.Web.Publishing.targets(4368,5): error : The value for PublishProfile is set to 'appveyor', expected to find the file at 'C:\projects\paragoncore-hr0q3\server\WebJob\Properties\PublishProfiles\appveyor.pubxml' but it could not be found. [C:\projects\repository-hr0q3\server\WebJob\WebJob.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Web\Microsoft.Web.Publishing.targets(4375,4): error : PublishProfile(appveyor) is set. But the $(WebPublishMethod) does not have a valid value.  Current Value is "". [C:\projects\repository-hr0q3\server\WebJob\WebJob.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Web\Microsoft.Web.Publishing.targets(4382,5): error : Target ValidatePublishProfileSettings Failed [C:\projects\repository-hr0q3\server\WebJob\WebJob.csproj]
Do you have any suggestions for what I can do to build and deploy this web project with a web job? I haven't needed an appveyor publish profile previously.
  1. 1 Posted by Owen McDonnell on 03 Oct, 2018 12:01 AM

    Owen McDonnell's Avatar

    This is likely some error in web job detection that was uncovered by the updated Microsoft.Web.WebJobs.Publish package. We'll need to look a little closer at it.

    In the meantime, you could try a custom build script which my colleague suggested to another user who was facing a similar problem to yours here.

  2. 2 Posted by nbierema on 03 Oct, 2018 12:06 AM

    nbierema's Avatar

    Thank you! Is there any time estimate of when you guys might fix the issue?

  3. 3 Posted by Ilya Finkelshte... on 03 Oct, 2018 06:19 AM

    Ilya Finkelshteyn's Avatar

    Will do this asap. Can you please share you WebJob project file (feel free to delete all you consider confidential from it). Just for us to double-sure fix will work for you.

  4. 4 Posted by nbierema on 03 Oct, 2018 12:18 PM

    nbierema's Avatar

    Attached the old WebJob csproj before the update and the new WebJob csproj after the update. It wouldn't let me upload them individually so I put them in a zip. Thanks again!

  5. 5 Posted by Ilya Finkelshte... on 04 Oct, 2018 02:36 AM

    Ilya Finkelshteyn's Avatar

    Can you try now?

  6. 6 Posted by nbierema on 04 Oct, 2018 03:08 AM

    nbierema's Avatar

    Seems to work now! Thanks again for your responsiveness!

  7. 7 Posted by Ilya Finkelshte... on 04 Oct, 2018 09:18 PM

    Ilya Finkelshteyn's Avatar

    Great! Thank you too for pointing to the issue!

  8. Ilya Finkelshteyn closed this discussion on 04 Oct, 2018 09:18 PM.

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

Keyboard shortcuts


? 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

Recent Discussions

07 Jul, 2020 06:21 PM
07 Jul, 2020 03:15 PM
05 Jul, 2020 02:33 AM
03 Jul, 2020 07:29 PM
03 Jul, 2020 03:53 AM


02 Jul, 2020 09:09 PM
02 Jul, 2020 03:24 PM
01 Jul, 2020 01:12 PM
30 Jun, 2020 04:26 PM
25 Jun, 2020 05:54 PM
24 Jun, 2020 08:11 AM