To build Csound with Visual Studio, you need at a minimum Visual Studio 2013 Express. Any versions before this do not properly support C99 and therefore will fail to compile correctly.
With MSVC installed, we now need to get access to the Csound source. You can use a GUI client such as Atlassian SourceTree or the command line version MsysGit to download the files from the correct branch. For normal Csound development, the "develop" branch is used and will contain the very latest code. For large features, they will have their own branch with an appropriate name. The "feature\vs2013" branch is currently the only branch supporting MSVC. This will hopefully be integrated into the main "develop" branch in the future.
Csound depends on a number of libraries for different features (full table below). These should all be downloaded and installed or built at this point. CMake will need to find these libraries while generating the VS solution but only if the Csound features selected requires them. To help this process, there is a script called "win_csound_env_variables.bat" in the root Csound directory. This will need to be edited first with the appropriate directory locations for the library locations for the current machine. When that is finished, simply execute the file and the environment will be updated with the new variables. All the necessary libraries for Csound should then be found by CMake.
In CMake, you simply need to point the source directory at the local git repository for Csound and specify an output build folder (outside of the Csound source repository). By clicking "Configure", you should be asked for the project type you would like. Select "Visual Studio 12" and the default compilers. CMake will then begin generating the files. It's possible some errors will be thrown about missing libraries and if that's the case, you can check the environmental variables/PATH or simply add the directories manually. At the end of this process, select "Generate" to emit the project solution file. This will be located in the build output directory.
Note: Make sure you specify an install directory under "CMake->CMAKE_INSTALL_PREFIX". The default will be located in "C:\Program Files\Csound" or something similar.
In Visual Studio, open this solution file and build the "ALL_BUILD" project. This will build everything required and you should end up with a working Csound executable. If you build the "INSTALL" project, it will copy the files to the install directory specified earlier.
This is the list of 3rd party libraries and versions that are known to work.
|Win SDK||7.1 (for Win7)||Windows SDK|
Below is a list of build features for Csound and their current state of functionality.
(O = Yes, compiling / fully tested)
(X = No, not compiling / not working)
(Empty = Not attempted to compile or test)