Visual Studio 2010 web.config conversions (TransformWebConfig target)

I am trying to write unit tests for my transforms, so I run:

msbuild migrated-project.csproj / p: Configuration = Release / T: TransformWebConfig.

This works for the new project that I am creating in VS2010, but not in this project. I guess it was a 2008 project. I know this should run in webplatformbuild, but what I'm trying to do is just start the conversion, so I can grab the converted web.config and run some unit tests to make sure that the correct values ​​exist.

I do not see that TransformWebConfig is referred to as a target in any project, so I'm not sure what I'm looking for.

+5
source share
1 answer

TransformWebConfig is referenced via Microsoft.WebApplication.targets, which refers to Microsoft.Web.Publishing.targets, which contains the TransformWebConfig target you are after.

I do not know what the problem is with your project without looking at the project file. Do you mind attaching it? It might be worth checking to see if the project references version 10 of the Visual Studio WebApplication target:

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />)

instead:

<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" />
+3
source

All Articles