Showing posts from June, 2013

Visual Studio TFS 2012 and Web Deployment Packages

If you have been using Visual Studio 2010 and TFS to build Web Deployment packages (usable with MS Deploy), there is in the project properties a parameter for the name of the Web application in IIS.
The parameter is available in the Package/Publish Web section under IIS Web site/application name to use on the destination server.
Unfortunately this parameter is not available in Visual Studio 2012.
You can specify it when using the Publish feature (by right-clicking on the project) but if you want to set up builds in TFS, you will end up with an application in IIS with a _deploy suffix.

One possible solution is to add an additional parameter to the MSBuild command to update the IIS Web Application name.
In the process properties of the build definition, update the DeployIisAppPath in the MSBuild arguments:

Entity Framework and TFS Build

I recently had an issue when trying to configure automatic deployments in TFS.
I was building a MS Deploy package with one build definition and deploying it with another.
The application was based on ASP.NET MVC with Entity Framework as a ORM
When I tried to open the application on the target server, I got an error "Unable to load the specified metadata resource".

The entity data model was configured to store the model files as resources into the assembly. The error was caused by the fact that the build process was no longer executing the packaging step. Usually Visual Studio does it automatically for you but MSBuild is not so kind. You have to manually tell it to execute the EntityDeploy step.

I added an instruction in the project file (containing the data model) to execute the packaging step.

After that I made sur…