views:

114

answers:

1

Hi Experts,

I am currently working on a project that consists of an ASP.NET MVC 2.0 front end and has been developed in VS 2008. I have been messing around with the Web Deployment Project to deploy the application so we can also change various Web.config settings based on the build configuration.

However, when the deployment project publishes the output files to its target (currently a location on my local machine), all the .ascx partial views are not included and so everything stops working. I can do a standard Publish via VS and all works as expected.

It seems that the deployment project embeds the .ascx files when it compiles everything. So, how do I get it to include the .ascx files as they are (i.e. not embeded)? Am I missing something?

Thanks in advance.

Nick.

+1  A: 

There are a few things you might want to consider:

  1. Make sure the .ascx are included as part of your project. They probably are, but I had to throw it out there.

  2. On the WDP property page, check the box for "Allow this precompiled site to be updatable.

  3. On the WDP property page, select "Merge all outputs to a single assembly" and provide a assembly name.

  4. Make sure you don't have any pre/post build steps which are removing those files intentionally.

Here's a walk through of Web Deployment Projects for ASP.NET MVC

Ben Griswold
I think I have everything setup as the walkthrough lists, but will have a check when I get back into work tomorrow. Cheers.
Nick
The walkthrough was spot on. Seems I was missing something...I needed to make the site updateable otherwise the .ascx files are excluded. Seems the same is so for .master files as well.
Nick
Great. Happy to help.
Ben Griswold