arame3333
arame3333

Reputation: 10193

Deploying 2 versions of the same application

I am working on a .Net MVC application and on the test server I want to deploy 2 versions of the same application.

I deploy by using the publish option for the relevant projects in the application.

On the test server I have separate folders for the 2 versions and in IIS (v7.5) I have 2 virtual paths.

However when I run the latest version of the application the compilation picks up the other version.

How do I stop this from happening?

Upvotes: 9

Views: 125

Answers (1)

arame3333
arame3333

Reputation: 10193

I found the problem was not to do with the 2 versions.

For some reason that I cannot fathom, I had a problem publishing the application. What I do is publish to a local folder and copy the contents to the test server to be deployed. What was happening was that the publish process did not overwrite some of the files in the local folder.

I cannot imagine why this was happening.

So I deleted the contents of this folder and published again.

This time it worked!

So I intended to delete this question, but I cannot do so as it has a bounty.

Maybe me answering my own question might help someone. It might even help me if someone can explain why the publish option was bahaving the way it did.

EDIT. Thomas Body in the comment below correctly points out that in the publish wizard you can tick the box that deletes everything in the folder before publishing.

Upvotes: 5

Related Questions