Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The target “ResolveWebJobFiles” does not exist in the project in Azure Website

Tags:

I have a Windows Azure project consisting of

  • ASP.NET project (using NancyFX) deployed as Azure Website
  • Business Logic class library
  • Unit test class library
  • 2 Console apps

I want those 2 console app to be deployed as Azure WebJobs with the Azure Website. So I right clikec on the ASP.NET project and chose Add | Existing project as Azure WebJob and added both console apps with the right schedule.

Everything seems fine, the 2 console apps now contain a JSON with schedule and the ASP.NET project contains a JSON with WebJobs definition. All the project build just fine.

The problem is, when I try to deploy the ASP.NET project to Azure, I get

The target “ResolveWebJobFiles” does not exist in the project 

I found this article when the author solved this problem by adding

<Import Project="..\packages\Microsoft.Web.WebJobs.Publish.1.0.2\tools\webjobs.targets" Condition="Exists('..\packages\Microsoft.Web.WebJobs.Publish.1.0.2\tools\webjobs.targets')" /> 

to his csproj file, but my csproj file for the ASP.NET project already contains this import.

Any ideas what the problem is?

like image 393
Igor Kulman Avatar asked Apr 09 '15 11:04

Igor Kulman


2 Answers

even i faced this issue. I reinstalled the below package in my webjob to solve it

package id="Microsoft.Web.WebJobs.Publish" version="1.0.2"

like image 95
Santosh Karanam Avatar answered Oct 26 '22 16:10

Santosh Karanam


Check to see if you have this file in your webjob project Properties folder: webjob-publish-settings.json

If not, create it with this content, changing only the webJobName (for now)

{   "$schema": "http://schemastore.org/schemas/json/webjob-publish-settings.json",   "webJobName": "MyWebJobName",   "startTime": "2014-12-09T00:00:00-08:00",   "jobRecurrenceFrequency": "Hour",   "interval": 1,   "runMode": "Scheduled",   "stopping_wait_time": 3600 } 
like image 22
Rob Campbell Avatar answered Oct 26 '22 17:10

Rob Campbell