Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>My web.config file provides the database connection strings that may differ between the systems. What is recommended method to defer this such that it is specific to the dev environment?</p> </blockquote> <p>For App|Web.config here's what we do:</p> <ol> <li>Add web.config to svn:ignore</li> <li>Copy web.config to web.default.config</li> <li>Add web.default.config to svn</li> <li>Add the following to your BeforeBuild target</li> </ol> <blockquote> <p></p> </blockquote> <pre><code>&lt;Target Name="BeforeBuild"&gt; &lt;CallTarget Targets="SetupWebConfig" /&gt; &lt;/Target&gt; &lt;Target Name="SetupWebConfig" Condition="!Exists('Web.config')"&gt; &lt;Copy SourceFiles="Web.default.config" DestinationFiles="Web.config" /&gt; &lt;/Target&gt; </code></pre> <p>FWIW, we also have another target which gets called before SetupWebConfig which deletes web.config if the build server is compiling the project, this allows changes to web.default.config to be included.</p> <p>You can get fancy and automatically replace content in Web.config using a token inside Web.default.config and some regex. This can also be bundled into the SetupWebConfig target. Let me know if you want to see an example. We do this for setting connection strings and similar stuff on our CI/build servers.</p> <blockquote> <p>My test project is dependent on NUnit, Moq, among other libraries. If the location of these libraries differs across the dev systems does this break the references? If so, how can I mitigate this issue?</p> </blockquote> <p>My advice would be to include the libraries in your subversion/git repository, place them in a common area, not your project, that way you can reuse them. Reference them using relative svn:externals (remember to set the externals to a specific revision number). This solves your problem plus allows you fine-grained control over what version of each tool you want to use, which is good for testing and maintenance of released products on branches.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload