def METHOD_NAME():
  for build_config in ['Debug','Release'] :
    mintaka = subprocess.Popen(['msbuild', './TerrariaServerAPI/TShock.4.OTAPI.sln', '/p:Configuration=' + build_config])
    mintaka.wait()
    if (mintaka.returncode != 0):
      raise CalledProcessError(mintaka.returncode)
    # run the bootstrapper to generate the new OTAPI.dll
    os.chdir('./TerrariaServerAPI/TShock.Modifications.Bootstrapper/bin/' + build_config)
    bootstrapper_proc = subprocess.Popen(['mono', 'TShock.Modifications.Bootstrapper.exe', '-in=OTAPI.dll', '-mod=../../../TShock.Modifications.**/bin/' + build_config + '/TShock.Modifications.*.dll', '-o=Output/OTAPI.dll'])
    os.chdir(cur_wd)
    bootstrapper_proc.wait()
    if (bootstrapper_proc.returncode != 0):
      raise CalledProcessError(bootstrapper_proc.returncode)
    tsapi_proc = subprocess.Popen(['msbuild', './TerrariaServerAPI/TerrariaServerAPI/TerrariaServerAPI.csproj', '/p:Configuration=' + build_config])
    tsapi_proc.wait()
    if (tsapi_proc.returncode != 0):
      raise CalledProcessError(tsapi_proc.returncode)