So far we have done quite a bit getting sublime up and going for use with .NET work but we still at this point have to compile our code from the command prompt which well sucks. In this post we will look at how to get compiles working from within sublime by adding a custom build system for xbuild.
Go to Tools->Build System->new build. A file will open. Drop in:
“file_regex”: “^ (.*)\\(([0-9]*),([0-9]*)”
Then save this file named xbuild. You can now choose xbuild as a build platform.
Is is important to note that you have to point at the correct xbuild (I run off trunk so I compile with a /opt prefix if you get from say apt-get it will be some place else) and you must have the correct mcs in your path when doing this. This code also assumes that you have only a single solution in the root folder of your code.
Once this is done you can choose xbuild as your current build provider. Then you can use either f7 or ctrl+b to build your code on demand.
Now we are really starting to get there. In the next post we will look at how to run unit tests from within sublime manually.