John Kaster
John Kaster

Reputation: 2597

Avoiding deployment when debugging an ASP.NET MVC application

Once an asp.net MVC project has a web deployment project associated with it, there doesn't seem to be a way to avoid deploying when you build the MVC project. I still want to be able to debug my MVC project locally and avoid deploying new versions of it. How do I configure the web deployment project to skip the deployment step when I'm trying to debug?

To clarify this question a little: I want the build process to deploy when I'm doing a release build, and not deploy when I'm doing a debug build. There should be a way to configure this without having to manually modify the projects in my solution every time I switch between debug and release builds.

Upvotes: 0

Views: 224

Answers (4)

Jaxidian
Jaxidian

Reputation: 13511

Have two different solutions: 1 where you do not include deployment Projects and one where you include your deployment projects.

This will allow you to choose, when you open up your solution, whether you want to develop with the application code or with the application + deployment code.

Upvotes: 0

Cheddar
Cheddar

Reputation: 4758

In the solution properties, expand Configuration Properties and go to the Configuration item. Each appropriate project has a Deploy Check Box.

I use this to keep reporting projects from deploying on every build.

Upvotes: 1

Jaxidian
Jaxidian

Reputation: 13511

Right-click on your web deployment project and select the "Unload Project" option. This is a quick/easy/temporary solution that will let you do what you want to do. Trust me, I know how painful it is to wait for deployment packages to compile and build! :-)

Upvotes: 1

LorenVS
LorenVS

Reputation: 12857

Unload your deployment project. (Right click on project in VS -> Unload Project) and Reload it when you actually want to deploy

Upvotes: 3

Related Questions