2
votes

I have a solution that has an ASP.NET MVC Web Application with source control in Visual Studio TFS online. The site is hosted in Azure, which deploys the site every time it is built in TFS online. Everything is working good.

I then added a Web Job project to the solution using Add > New Azure WebJob project and I set it up with some help from this post on the azure blog. Since then, I noticed that any changes made to the web application does not reflect on the deployed site anymore. I don't see any errors in the build log in TFS online.

To work around the issue, I have to 1) remove the web job project from the solution and 2) comment out everything in the webjobs-list.json file in the web application's Project Properties before deployment. This essentially puts the solution back in the state before the web job was added.

I was wondering what I could do to prevent my problem from occurring. I think I maybe missing some configuration step, but I don't know where to look.

1

1 Answers

2
votes

Azure's automatic source integration will only deploy the first project (alphabetically) in the solution. So if your new web job is named ahead of your old MVC application (alphabetically) it will try to deploy the web job instead of the MVC application.

There are two solutions to this:

1) Name your MVC project so it is first project in the solution alphabetically

2) Put your web job in a separate solution