views:

201

answers:

3

I am working on an ASP.NET project in Visual Studio .NET 2010 and attempting to make an MSI installer using a Web Setup Project. I added the Primary output from the project (which seems to pull in the relevant dependencies) and the Content Files from the project (which pulls in the Web.config and the .svc files).

The issue is that rather than applying the XDT transform and creating the Web.config using the Web.Release.config, it just copies the Web.config, the Web.Release.config, and the Web.Debug.config into the installer without doing any transformation at all.

How do I get it to apply the Web.config transformation before creating the installer?

A: 

Any luck with this? Just ran into the same issue?

Trevor
See my answer to this post for the solution I ended up using to solve this issue.
Ryan Mentley
A: 

You have to make a deployment project (I think this is a separate download), then your Web Setup project take the precompiled output of the deployment project as it input. One neat thing is that you can have it change a section of your Web.config when it builds.

JBrooks
This might be the answer; however, I don't have administrator privileges (as it is a work computer) so I can't test it to be sure.\I ended up adding an entry into the .csproj file to perform the transform - I'll post the details soon.
Ryan Mentley
A: 

The answer ended up being located on another SO post which I missed when I was searching through before asking because it wasn't exactly what I wanted:

http://stackoverflow.com/questions/2905151/msbuild-script-and-vs2010-publish-apply-web-config-transform/2970138#2970138

A co-worker suggested using that to place the transformed Web.config in the project's bin directory and a Web Setup Project configured to grab the Web.config out of the bin directory and put it in the installer. This ended up being the most workable solution without installing any add-ons into Visual Studio.

Ryan Mentley