Converted MVC app to Azure Cloud Service Project - cant get latest - azure

I converted an MVC5 app to an Azure Cloud service project and it created the Azure project (used this page for instructions http://msdn.microsoft.com/en-us/library/azure/hh420322.aspx#ProjectTemplates
)
I checked in the newly added project to TFS by right-clicking the project and selecting Check-in. When I tried to get latest from another dev machine, the Azure project does not show up in the solution explorer. What am I missing? Does each dev machine need to create the Azure project independently? I can see the files in TFS and they were copied down to my local drive, but the project doesn't show up under the solution.
thanks,
Andy

You need to checkin the changes to the sln file also, and ensure your workspace mapping includes the solution file.

Related

How to publish Blazor webapp to Azure

Can anyone please help with the following.
I am just starting out with Blazor (using Visual Studio 2019). I have followed an online tutorial and have a trival app working locally (just selected the Blazor project type when I created a new project in Visual Studio and built it and now it's running at https://localhost:44311/ on IIS (as long as the project is debugging) ).
If I now right click on the project and select "Publish", and then I select "Azure App Service" and then I click "Publish", then Visual Studio hangs forever with a spinning wait cursor saying "Loading subscriptions". If I look under View -> Cloud Explorer and click the Account Management icon, I see my account is there, so that's fine.
I normally develop my webapps with Node and my preferred workflow is to write the Javascript code in Visual Studio and then use git cli to update a git repository which is linked to an Azure webapp which automatically builds when I commit code. Could I do the same with my razor app? If so, which files from the Razor app directory (wwwroot?) would I need to add to a new github repository and commit in order to then create a new web service through the Azure portal to then link to that github project?
As long as I get one way working to publish the app that would be great.
Thanks for any help,
Mitch.

Setup Azure Pipelines from Visual Studio 2017 Community

I am facing an issue with setup of azure pipelines. I am stuck with this window, where it will not give me any option to select azure project.
Here is what I have done already.
created a repo on github.
created an AzureDevOps account and created a project.
Build agent is setup along with build configurations in AzureDevOps which is getting the source from GitHub repo.
How can I get my AzureDevOps project to be populated in the given image?
Somehow I found a crude way to fix this issue, this may not be the ideal solution.
Now I am able to see the azure devops project. It looked as if I have multiple Azure subscriptions mapped to my account and there was a conflict somewhere.
I deleted the %local% folder.
The absolute path is C:\Users*USERNAME*\AppData\Local

How to deploy a static website to Azure from Visual Studio Team Services

I have an existing website that I would like to deploy on Azure, using Visual Studio Team Services. The website is made up of static files, there's no ASP.NET or anything else involved.
Within Visual Studio Team Services, I created a build which executes npm install and a gulp build. This results in a dist folder containing all the files for the website. In Azure, everything is set up correctly (subscription, web app,...).
However, I'm unsure on how to push my code to Azure. Exploring the options in the Release tab in VSTS, an 'artifact' always seems to be required, but I just have a bunch of files. I need to publish the files in the dist folder and make sure index.html is served.
How can I do that?
This question is related to this one, however, the answers all state to start from Azure, and do not mention how to deploy existing code using Visual Studio Team Services.
The trick is to create the artifact yourself, which can be as simple as a zip file containing the static website files. The zip file should be copied as an artifact to the $(build.artifactstagingdirectory) target directory. Next, you can use a simple Web App deployment task to publish the zip file to Azure. If index.html is in the root directory, Azure is smart enough to serve it.
Below is a working build and deploy flow. It assumes gulp is used to build the website and write the build output (i.e. the static files) to a dist folder.
The easiest way is to deploy from a source control, if you take a look under "Settings" for your Website in the Azure portal you will probably see "Continuous deployment".
From there you can deploy from Visual Studio Team Services, Github, etc.
Every check-in will be deployed, also wrong ones, so you may want a introduce a staging environment as a deployment slot as well, where you can swap staging with production whenever you feel your site is ready for production.
Without the need to create an artifact, another solution could be FTP deployment after creating an Service Endpoint in VSTS

Visual Studio app deploy is deleting extra files on Azure web site

I'm using the AzureContinuousDeployment.11.xaml Visual Studio 2013 Template for CI builds from visualstudio.com to an Azure website and it's working great.
However, I need to keep additional files on the server (the app creates files). If I was using the "Web deploy" method, I'd simply disable the "Remove additional files at destination" property, but I don't see an option for that using the Azure deployment template.
I should be able to add /p:SkipExtraFilesOnServer=True to the MSBuild arguments in the build definition, but it isn't working. Files are still being deleted from the web server when I deploy.
I've also tried creating a publish profile and adding it to the template. It hasn't worked either.
I don't think there is a way to keep app-created files while using visual studio deployment. I suggest you to create an Azure Storage account and store those files in the storage (blob would be good enough). It seams that you are using ASP.net. See more detail at Microsoft Azure Storage Client Library for .NET.

How to migrate a VS2012 Azure Cloud Service Project to VS2013

I have two ASP.NET MVC 4 projects created in VS2012. For each, I created an Azure deployment project and they are both deployed successfully to Azure. I got a new dev machine and started fresh with only VS2013 installed, hoping that, as advertised, I wouldn't have to go through the pain of migrations that would make the projects tied to this version. Well, that didn't turn out true, as Azure projects must be upgraded to v2.2 of the Azure .NET tools and API to be opened in VS2013.
On the first project, I installed the 2.2 tools and with a few other relatively minor adjustments, the project works fine. Now, on the second project, however, I can find no way to perform the upgrade. When I opened the project in VS2013, it gave me a migration report saying that the Azure project was incompatible and the only solution offered was to install the 2.2 tools, which of course, has already been installed. I then decided to remove the existing azure deployment project and create a new one as I did before on vs2012, by right-clicking on the web project and choosing "Add Azure deployment project", which wires everything up automatically. Well, that menu item does not appear in the context menu on the web project.
Now, I'm at a loss for how to resolve this, other than installing VS2012 and forego taking advantage of the advances in VS2013. Does anyone have any suggestions how i can get an Azure deployment project working with this project?
(BTW, this is a must, because I am using the azure api to get config items out of the azure config.)
I had the same issue. I solved it by installing the 2013 version of the Azure 2.2 SDK (found here). After doing this I was able to build and run the solution (without any conversion) in both VS2012 and VS2013.
UPDATE:
Try to add a new Azure Cloud Service project to your solution by right-clicking the solution > Add > New Project.
Under templates there should be a section named 'Cloud' with a project template named Windows Azure Cloud Service. When you select this template you should get a dialog where you can add Azure roles to your solution.
If you select ASP.NET web role, a new Web project will be created in your solution. If you don't select anything, you will get an empty Azure project to which you can add your existing MVC project (WebRole Project > Right click Roles > Web role project in solution).

Resources