Config Transforms with Web Deployment Projects

  • Thread starter Thread starter Chuck
  • Start date Start date
C

Chuck

Can you use Config Transforms with Web Deployment Projects.

I couldn't get it to work in VS2010. Nothing happened. Other than the
transform files got copied over.

I turned off the web.config files section replacement option in the web
deployment project.
 
Hi Chuck,

Please check if you are using correct config file (web.debug.config for
DEBUG web.release.config for RELEASE)

Here are my test steps:
1. Create a C# web application in VS 2010
2. Add follow lines in web.config:
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
3. Add follow lines in web.debug.config:
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
4. Save all files
5. Create the deployment package
6. The customerror element is changed in
\obj\Debug\TransformWebConfig\transformed
--
Sincerely,
Zhi-Qiang Ni
Microsoft Online Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

MSDN Managed Newsgroup support offering is for non-urgent issues where an
initial response from the community or a Microsoft Support Engineer within
2 business day is acceptable. Please note that each follow up response may
take approximately 2 business days as the support professional working with
you may need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations that require urgent,
real-time or phone-based interactions. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
 
Did you create a deployment or a Web Deployment Project.
I was using a web deployment project.
 
Hi Chuck,

Regarding on the problem scenario, I have performed some local
tests(through WebDeployment project in Visual Studio 2010). Yes, I did
repro the same behavior you mentioned, the Visual Studio 2010 web
deployment project works the same as the VS 2008 one. The configuration
Transforms(from the "Build Deployment Package" command) is not available in
the web deployment project.
This seems a by design limitation of the web deployment project and so far
the workaround I've tried is we first generate the transformed web.config
file(either based on debug or release web.config files) in the web
application or web site project (before compiling them using web deployment
project. And in the web deployment project, we still use the web.config
standard file.

Also, as for this limitation, I would recommend you post it to our feedback
center for vs 2010 and .NET framework 4 so that the product team can get
informed on this:

Connect site for Visual Studio 2010 and .NET Framework 4
https://connect.microsoft.com/VisualStudio?wa=wsignin1.0

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


--------------------
From: =?Utf-8?B?Q2h1Y2s=?= <[email protected]>
References: <[email protected]>
Subject: RE: Config Transforms with Web Deployment Projects
Date: Tue, 29 Jun 2010 15:15:38 -0700
 
Thanks for reply Chuck,

Though we will have some communication channels with the dev product team,
but there is no direct contact on specific dev engineers and even DEVDIV
group has many teams focus on different products. So far for internal
communication we will periodically forward some hot/frequestly asked issues
to the product team and we can help add this issue into the list also. And
for public, the Connect Feedback site is the recommended channel. BTW, have
you ever worked with some certain engineers in the DevDiv group?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

--------------------
From: =?Utf-8?B?Q2h1Y2s=?= <[email protected]>
References: <[email protected]>
<[email protected]>
 
BTW, have
you ever worked with some certain engineers in the DevDiv group?

Periodically these days. Did frequently when asp.net 1.0 was in pre-beta.
 
Back
Top