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