문제

I have a custom MSBuild script and in that, I'm using the MSBuild task to compile a solution.

In that solution I have multiple projects and some of them have web.config's that need to be transformed at some stage in the process. The transformation is currently just the connection strings, but that may change.

So, should the web.config's be transformed before or after the MSBuild task?

도움이 되었습니까?

해결책

It should not matter.
The web.config is only read in at run-time, and does not effect the outcome of a pure compilation step.

If you are, however, packaging a web-site, by using MsBuild /T:Package, then the transform occurs as part of the packaging process, which occurs after the compilation step completes.

Hope this helps.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top