Hi,
The following article will help you set up a unit test project within Visual Studio.
Creating Unit tests for your c# code[
^]
Once you have your tests created then you can run them with Ctrl+R,A
These unit tests are also used in TDD when the tests are written first then the methods are written to accommodate them.
More on TTD here:
.NET TDD (Test Driven Development) by example - Part 1[
^]
Running the tests will cause your code to compile anyway so you don't need build events:
But just as an FYI, you can set up pre-compile / post-compile commands in the project properties window under the Build Events. You can have advanced bat script here but I find it's best to just call a .bat file.
More on this here:
Open project properties[
^]
Build Events tab[
^]
Build Events key words[
^]
Hope this helps ^_^
Andy