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).
Related
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.
I have a Visual Studio solution that contains two web applications (our main site and our WebAPI project). I am able to host them locally in IIS Express as a single site using the applicationhost.config, but I want to package them (in our Build) and then deploy them (in our Release) as a single site from Visual Studio Online (which hosts our code) to Azure.
My Visual Studio Team Services Build configuration packages each of the Visual Studio projects into its own Web Deploy package. The Web Deploy packaging is done during my Build phase, and the deployment to Azure is done during the Release phase - this is done so I am not recompiling source every time I do a deployment, which is unnecessary and would slow down the process.
The first web application identifies "HelloAzure" as the DeployIisAppPath in its pubxml file. The second one (the WebAPI project) identifies "HelloAzure/api" as the DeployIisAppPath in its pubxml file.
Currently, I am using two of the "Azure Web Site Deployment" steps (the one that uses Service Endpoints to perform a deployment). I name the same web app name for both steps. When the second project is deployed, it seems to overwrite the first one rather than adding a second application to the existing site. I believe I must not be following the intended practice for deploying several Web Deploy packaged applications into one web site from Visual Studio Team Services to Azure, but I can't find the recommended practice documented anywhere.
I do need to have both applications hosted within a single site. Deploying them as separate sites is not an option.
It appears that Kudu has some options that might support this scenario, but I am not deploying from source code, I am deploying from Web Deploy packages created by our Team Services build.
The MSDeployAllTheThings VSTS extension supports deployment to a virtual app in an Azure site.
https://marketplace.visualstudio.com/items?itemName=rschiefer.MSDeployAllTheThings
Microsoft also seems to have added official support for deploying to virtual apps from VSTS to Azure to the AzureRM VSTS extensions according to this thread: https://github.com/Microsoft/vsts-tasks/issues/624
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.
I have configured a cloud service to run multiple web applications in one web role. More information on this is in the documentation.
The documentation does not appear to be correct for local builds with the Azure 2.3 SDK. Apparently, since SDK 1.8, the physicalDirectory attribute is not relative to the Azure cloud service project folder, but its output folder. Also see this question. By changing the path to ../../../Project.Name the service can be built and deployed locally from VS2013 with SDK 2.3.
We also use continuous integration on Visual Studio Online. However, the project now fails to build with the message that the path to my second web project is invalid. The path it's trying to use is C:\Project.Name\. I don't think this is quite correct.
I have tested with ../Project.Name as the physicalDirectory attribute value on VSO, but that also fails.
Is it a matter of somehow correctly configuring this for Visual Studio Online, or is it simply not currently supported?
While using Github (or anything other than Visual Studio Team Services) I can use the following page to customize deployment: https://github.com/projectkudu/kudu/wiki/Customizing-deployments
I'd like to customize my deployment as I currently have both a web app and a web api project. I want the web app to be deployed, as default it deploys the web api project. Using project Kudu the settings (.deployment file or even better, the app settings on Azure itself) works great, but not when you deploy from Visual Studio Team Services.
I've spoken with David Ebbo from Project Kudu, and he explained that VS Team Services doesn't use Kudu at all, but probably MS Build. So my question is, how to specifically deploy the web app.
I managed to change the Build Definition and specify the web app .csproj as the Projects To Build. This works. However, I also want to deploy my web api.
Deploying the web api project with Kudu is easy as I can create a separate website, connect to the some repository (and solution) and specify the Project App setting so that it deploys the correct .csproj. How should we do this for MS Build? When I change the Build Definition, it will always deploy the project specified in there.
Just saw another answer on Stackoverflow that looks to solve this problem: Publish Multiple Projects to Different Locations on Azure Website