In VS2010, when I right click on my web.config file the \"Add Config Transforms\" option is greyed out.
Any idea how I can get that back?
If it's a custom configuration you're adding via Configuration Manager, be sure to check the "Create new project configurations" checkbox (it's unchecked by default) when you create the configuration.
I had this issue after having already added extra Configurations from Configuration Manager.
I had to delete them, and re-add them before Visual Studio would enable "Add Config Transforms"
I'm guessing the configurations for these in the web project were removed/corrupted at some point, and it needed to be reset.
Restarting Visual Studio worked for me. I won't say it'll work for everyone, but it's certainly worth trying.
I had 5 configurations, but only 3 transform files. I was not in debug mode, but the option was still grayed out.
One can also avoid the configuration manager dialog entirely and just directly edit the project file, adding as many additional config files as needed.
This is especially useful when using a more advanced config transformation tool like CodeAssassin.ConfigTransform or SlowCheetah.
<ItemGroup>
<Content Include="web.config">
<SubType>Designer</SubType>
</Content>
<Content Include="web.debug.local.config">
<DependentUpon>web.config</DependentUpon>
</Content>
<Content Include="web.debug.cloudstaging.config">
<DependentUpon>web.config</DependentUpon>
</Content>
<Content Include="web.release.cloudprod.config">
<DependentUpon>web.config</DependentUpon>
</Content>
</ItemGroup>