views:

351

answers:

2

I am working in the new Visual Studio 2010 RTM and I would like to use web.config transforms.

My site is configured to use .NET 4.0 but it was formerly a Visual Studio 2008 web application project.

When I right-click on my web.config file I do not see the 'Add Config Transforms' option as I should. I also tried adding creating a new web.config but I still do not see the transform option.

Does anyone know how to enable web.config transforms for projects in Visual Studio 2010 that were originally created in Visual Studio 2008?

+1  A: 

I was able to get this to work with my existing project.

I did it by opening my csproj file in notepad and comparing the child elements to those of a brand new ASP.NET MVC project for VS2010.

I then removed several elements that I didn't need and saved and reloaded my project. Then I was able to select 'Add Config Transforms.'

I do not know exactly which element was the culprit but I would guess it was either <ProductVersion>9.0.30729</ProductVersion> or <OldToolsVersion>3.5</OldToolsVersion</>.

YeahStu
A: 

Take a look at this post http://blogs.msdn.com/b/webdevtools/archive/2009/05/04/web-deployment-web-config-transformation.aspx

aim
This post does not mention anything about enabling config transforms for upgraded projects as far as I can tell.
YeahStu