How to Deploy to Azure websites using Visual Studio Online and TFS? - visual-studio

I have an MVC 5 application with Entity Framework. I was hoping to setup a continuous delivery using Visual Studio Online and TFS to Azure websites.
At first, it looked like i succeeded in setting up my application for continuous delivery, as when i check in the project, the build started and succeeded. Then i went to browse the website, there was nothing. I went into Visual Studio Online to check my builds, i noticed that under "Completed" tab, all builds completed successfully, but when i click on "Deployed" tab none were deployed "No builds have been deployed today by anyone"
I followed Continuous delivery to Azure using Visual Studio Online and i was under the impression that all i need is to check in my code and it would deploy to azure.
Could someone please help me with this problem?

Related

Push to Azure DevOps from Visual Studio with Agile Process as Default

I connected Azure DevOps to Visual Studio and when I press "Publish Git Repo" everything is working fine.
But it always creates a Scrum process Dashboard.
I made Agile as default and disabled all of the others in my organisation.
Now Visual Studio throws this error
VS403119: You cannot add a team project with process Scrum as it is disabled. Either choose a different process, or enable process Scrum and try again.
So it means the setting is somewhere in Visual Studio.
The only thing I found about it is this two years old question.
Do you know the setting or some config file to change the default process board when publishing to the Azure DevOps from Visual Studio?
Visual Studio always specifies Scrum process when creating Azure Devops project via its Team Explorer, as I know there's no VS settings available to manage this behavior.
As a workaround you can create the project with Agile process in web portal first, add local project/solution into source control and choose Target Project(Click Advanced) before publishing the repo:
Actually this behavior is VS-specific cause Azure Devops itself supports specifying process template even by Rest API. So I decide to post a feature request related to your requirements in User Voice forum with VS tag instead of Azure Devops tag. The product team would provide the updates if they view it.

Azure Web Site not updating via Visual Studio Web Deploy

This may be a basic question, but I've searched for a little while and couldn't find anything specific to this.
I bought a domain and created the web app in Azure for hosting, and set up the DNS so that it's linked to the Azure Web App. Using Visual Studio 15, I opened the website via the FTP connection settings found in Azure, and was able to create files, edit the html, css, etc. Going forward, I wanted to use Web Deploy with Visual Studio to push new builds of the code up to the web site. I downloaded the publish profile from Azure, and imported it into a new visual studio project. I also copied all the previous files over(it wasn't alot). I got the correct Web Deploy settings and successfully published the solution to the Web App in Azure. However, it never updates the code with my new changes. When I look at the site in Firebug it still has the same files/code that it had when I edited it via FTP.
Any idea what I'm doing wrong?
I followed your steps and everything published perfectly for me. Did you try to simply refresh the file list to make sure Visual Studio is seeing all your files? Are they included in your project?
Also, when you go to publish, on the 4th step labeled preview, try to hit "start preview" and see if it detects any changes.
Also, could you tell me a bit more about your project? Is it a website project folder, mvc solution, etc?
You could try to clean the website to make sure your new files are getting deployed.
Clean Windows Azure Website

Publish from TFS 2013 to WebSite IIS : Failed with no error

At my company, we have received Team Foundation Server 2013 and Visual Studio 2013 to manage our code and deployment.
I'm trying to make it work but I can't figure out what I miss.
So here is the scenario :
I have a Web Application with no DB for the moment.
It's added to TFS and I have checked in everything.
There is a Build Controller on TFS.
On the Web Server, Web Deploy is installed and Management Services is there and allow remote management. The services are running. I have create a website but the folder with the source is empty for now.
My objective is to build on TFS and deploy from there in one single operation with the build definition.
Here is my problem, the build is working fine and everything is put in the drop folder. But it deploy nothing on the webserver and It raised no error on the build.
I tryied two techniques for the MSBuild arguments:
1) I create a publish profile in VS, when I publish from there it works but with this argument it does nothing:
/p:DeployOnBuild=true;PublishProfile=PublishIGU
2) I use this argument :
/p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish
/p:MSDeployServiceURL=https://{serverWeb}:8172/msdeploy.axd
/p:DeployIISAppPath=IGUDEV /p:MsDeployPublishMethod=WMSVC
/p:AllowUntrustedCertificate=True /p:UserName=DOMAIN\user
/p:Password=XXXXX
And... it still does nothing.
I read a lot on the internet and follow tutorials but I can't figure this out.
Like I don't have any error message I don't know where to start.
Thank you if you see something that could help me.

Set Up Continuous Integration From VSO to Azure, but Website does not deploy

I have an azure website that I have successfully linked to a team project in VSO. When I go to the "deployments" tab of this site in azure management, it says:
The team project is linked. Visual Studio Online will build and deploy
your project to Windows Azure on your next check-in.
Below, it gives options to check in from VS2012 or 2010. I am using VS 2013.
In VS, I am able to check in changes and see those changes building in the cloud in the team explorer. My expectation is that after the changes build, they should be auto deployed to the website. This is not happening. I have made several checkins, and none are deployed to the website. It's probably that I have something configured incorrectly, but I'm not sure how to debug this.
In the Build Settings I am using the TFvcContinuousDeploymentTemplate.12.xaml build process template. One thing I did notice is that the under the Deployment Parameters, I noticed that Windows Azure Deployment Environment is empty, but if I try to populate that I'm not sure what to enter for "Web site name" or "Webspace" under the web site radio buttom.
I have followed instructions on these websites to no avail:
http://azure.microsoft.com/en-us/documentation/articles/cloud-services-continuous-delivery-use-vso/
http://channel9.msdn.com/Events/Build/2014/3-584
http://www.visualstudio.com/en-us/get-started/deploy-to-azure-vs.aspx
How can I check on the status of the deployment? How can I make sure that the project/solution is correctly configured to deploy/publish and not just build?
Some additional info:
To set up the continuous deploy, I goto azure management portal, click websites, open the website in question. Click the Deployments tab. It says "The team project is linked, Visual studio online will build and deploy your project to Windows Azure on your next check in". Under YOUR SERVER is lists the correct visual studio online URL for my source project (https://------.visualstudio.com). This is my first time trying CD. It has not successfully deployed yet, but the build is working. Every time I check in changes, a cloud build is triggered and it is successful.
I'm new to this, so I am likely making some unfounded assumption, but after going through the instructions multiple times I'm not sure what I can be missing.
Thank you!
l19 has the right idea in the comment responding to my post. I needed to specify a Windows Azure Deployment Environment. The website name is the name of the website. Webspace is a bit trickier, and unfortunately the documentation link in visual studio redirects to a not found page. This has to be precise (e.g., "west us" won't work). I was able to figure out the proper string by creating a new project from azure and associating it with vso from the start. In this case, the build definition was correctly configured. I opened the Windows Azure Deployment Environment and saw that the webspace was set to "eastuswebspace", so I used the same string in my real build definition and it worked.

Azure WebJobs Deployment with Continuous Integration on Visual Studio Online

Friends,
I am trying to setup Continuous Integration with Azure WebJobs. I have a Web and a WebJobs project in the solution. I have continuous integration and deployment already setup for the web app in Visual Studio Online (*.visualstudio.com).
I also connected the WebJobs and the Web app using the Visual Studio ASP.Net extensions - Right click the WebSite project in VS 2013 > Add > Existing Azure WebJob project. It created webjobs-list.json file in the website project.
I was expecting that when the Web app deployment happens to Azure Website after the Visual Studio Online build, it will deploy the WebJobs too. But it is not doing so.
How do we automate the WebJobs deployment after Visual Studio Online build in visualstudio.com?
The WTE team is aware of the TFS publishing issues. I've been personally working on developing a workaround with which I'm comfortable but haven't finalized it yet. My team is working on an improvement to the WebJobs publishing experience from VSO. This item is absolutely on our agenda to repair, and will be included in the next VS update. In the meantime I'm trying to come up with a workaround for the time being; once that workaround is prescriptive enough to post, I'll write a post summarizing the process on our team blog.
This looks like the way to do it with VSTS
https://blogs.msdn.microsoft.com/tfssetup/2016/05/18/deploying-and-schedule-azure-webjobs-from-vsts-to-azure-web-app-with-bonus-cron-scheduling/
Basically,
Use VS to link your web job to a web app.
Create a new Buildtask that uploads the WebJob.zip file.
Profit.

Resources