开发者

Visual Studio 2010 web.config transformations (TransformWebConfig target)

开发者 https://www.devze.com 2022-12-25 12:28 出处:网络
I am trying to write unit tests for my transformations, so I am running: msbuild migrated-project.csproj /p:Configuration=Release /T:TransformWebConfig.开发者_JAVA百科

I am trying to write unit tests for my transformations, so I am running:

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

开发者_JAVA百科

This works for a new project I create in VS2010, but doesn't in this project. I'm assuming it's because it was originally a 2008 project. I know this is supposed to run in a webplatformbuild whatever, but what I'm trying to do, is just run the transform, so I can grab the transformed web.config, and run some unit tests to make sure the right values exist.

I don't see TransformWebConfig referenced as a target in either project, so I'm not sure what I'm looking for.


TransformWebConfig is referenced through Microsoft.WebApplication.targets, which references Microsoft.Web.Publishing.targets which contains the TransformWebConfig target you're after.

I don't know what's the problem with your project without having a look at your project file. Do you mind to attach it? Might be worth to check whether the project references the version 10 of Visual Studio WebApplication target:

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

instead of:

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

精彩评论

暂无评论...
验证码 换一张
取 消