Domanda

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?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top