Can I use Web Config Transform when publishing to azure with Visual Studio 2012? - asp.net

I have three enviroments for my asp .Net mvc application Local, Development and production. This means i need three webconfig files. The transformation seems to work fine with local and development deployment through a build server but not when deploying to production. It works when i manually publish the site from visual studio 2012.
Does it have something to do with the servicConfigurations for the different enviroments?

If you're going to Azure, then you can use publishing profiles. The trick is to chain your config files with your environment settings in Visual Studio.
There's an overview of publishing profiles here:
http://msdn.microsoft.com/en-us/library/ff398069.aspx
And Scott Hanselman walks through a number of scenarios with chained config files here:
http://www.hanselman.com/blog/TinyHappyFeatures3PublishingImprovementsChainedConfigTransformsAndDeployingASPNETAppsFromTheCommandLine.aspx
With those two pieces, there is enough info there to not only manually get the configs transforming, but also to work those into CI.
Hope this helps, cheers.

Related

Configuring existing ASP.NET project for DNVM, DNX environment on a Mac

I have an ASP.NET Web API project created on Windows using Visual Studio. How can I set this up for use with DNX/DNVM (on a Mac)?
Switching to Git solved the source control compatibility with TFS. But I wasn't able to find references to getting a project working across both these development environments.
I'm assuming as a first step the project will have to be migrated to ASP.NET 5/vNext but wondering other problems lurk around the corner with different project members using different environments.
I get an error when I run - git:(master):dnx . kestrel
As you mentioned yes you will have to migrate any namespace changes. I have a project that is developed across both. Also changing csproj files to xproj. Support is coming for some kind of interop between the different project types but its not here yet.
For build, publish, deploy from git without relying on VS publish capabilities or MSBuild you can follow my blog post here.
Basically you use DNU to publish and then kudu to deploy.

Web Deployment tools for Visual Studio 2013

I am responsible for supporting a relatively complex Website project written with .NET 3.5.
Previously I was using Web Deployment Project with Visual Studio 2010 to deploy this website but at the moment I have only access to Visual Studio 2013.
As far as I know, there is no longer such a tool to be used for deployment in Visual Studio 2013 and I do want to compile the code before deploying to the production server. As mentioned earlier, the project is a bit complex and this would not be easy to be converted to a Web Application.
Any idea?
Unless I missed it, unsure what the issue is - in VS2013, Publish is what you are looking for (either WebSite or Application).
What exactly do you mean by "none of the (vs 2013 publish) options worked"? What is/was the issue?
In one of your comments, you state you want to "pre-compile" (aka "don't want to upload .cs source files) and that's a setting in Publish.
You can Publish to your local file system: "Custom" -> File System:
This extension still exists for Visual Studio 2013: http://www.iis.net/downloads/microsoft/web-deploy
Little bit confused with the question because you are keep referring about website rather web application.
If you are looking to convert web site to web app then you need to follow this: http://msdn.microsoft.com/en-us/library/vstudio/aa983476(v=vs.100).aspx
Otherwise, if you are referring about the deployment project. Yes, it is no longer available.
I'd a very similar situation like you and Since 2013 I have stopped using any deployment project, instead I have started using Publish that creates a deployment package for you on a Network , FTP, Local Drive or even on Azure.
Here is a nice guide from Microsoft
http://msdn.microsoft.com/en-us/library/dd465323(v=vs.110).aspx
If you still want to go for Deployment Project, then you would need to go for "Installshield" limited edition,which is free (http://samirvaidya.blogspot.com.au/2013/11/how-to-enable-installshield-le-for.html).
http://msdn.microsoft.com/en-us/library/2kt85ked(v=vs.110).aspx

Web config transforms not working with Visual Studio online, VS2013 and Azure

I have an MVC5 website successfully deploying a staging and production release to Azure using continuous integration from Visual Studio Online (TFS).
I have followed this blog post
Continuous Delivery to Azure Websites with git using custom deployment script
I have even added the build that is required to build to my publish profiles. ie.
stagingbuild | any cpu.
note: this was not mentioned in the above mentioned blog post.
The sites deploy ok using by VS2013 build but the configs are not transformed. I just get the default web.config settings and not the transformed ones from web.staging.config etc.
note: I am only trying to transform one appSetting at the moment to get it working
I totally understand how to write transforms so I don't think this is an issue and when I preview my transforms in VS2013 they transform in the previewer window.
note: I am not publishing directly from VS but committing my changes to repo and continuous integration kicks in from my Visual Studio Online repo.
Try:
Open Builds in Team Explorer
Edit Build Definition of your build
Set Process > Build > Configurations > Any CPU|Release or any other configuration/CPU combo.

How am I supposed to deploy an ASP.NET 4 MVC website?

What's the recommended way to deploy a website created with ASP.NET 4.0 and Visual Studio 2010?
I've previously always added a web setup project to my solution, and used that to create an MSI, even for small applications.
But when I build a web setup project in VS2010 it kind of works but some stuff still seems broken:
1. I need to turn on IIS 6 Compatibility on a Win 2008 R2 box to get the msi to run.
2. The msi includes web.config, web.debug.config, and web.release.config. I thought VS's web.config transformations was supposed to take care of that.
-Matt
I suggest looking at using MSDeploy, which packages up all your files and configuration settings into a zip file that can then be imported into IIS 7.
Scott Hanselman had a great presentation that shows how to use MSDeploy.

Web Deployment Projects - Remote IIS Server

Background
In the spirit of continuous integration, I'm trying to automate our deployment process using a Web Deployment Project. Mostly, this has been painless. Most options were baked in and those that weren't were easy to add through the MSBuild XML interface.
However, I cannot seem to find an option for deploying to a remote IIS Server. This seems strange to me because I obviously don't want all my builds to run on my production/staging server.
The Question
How can I set up my Web Deployment project to create/overwrite an IIS Virtual Directory on a remote machine?
Notes
I am using Visual Studio 2008 and .net 3.0.
[Edit]
As suggested by x0n below, I could use MS Deploy for this. I would rather use a Web Deployment Project though, especially since we already have those set up. :)
Your best bet is to take a look at MS Deploy which is available as a stand-alone package right now at RC level. It ships with a Go-Live license, which means it will be compatible with the version shipping with Visual Studio 2010. Some info:
http://blogs.iis.net/msdeploy/default.aspx
It's a great tool - will sync remote servers, farms etc picking up missing metabase info, com objects, registry, .net components in bin or gac, databases - the whole hog. It also ships with an interactive shell and powershell cmdlets.
-Oisin

Resources