This project is read-only.

prepare.bat should work OOB with latest VS "14"


The build instructions tell us to run the latest Visual Studio "14" CTP, and then run prepare.bat:

However, prepare.bat has several bugs in it.

First, prepare.bat should be renamed prepare.cmd. This is best practice for Windows command scripts, since .cmd ensures that the script will always execute in cmd.exe. On 32-bit Windows, .bat files are executed by

Second, prepare.bat looks for %VSSDK120Install% and sets %targetVS% to 12.0. All of these environment variables should be changed to refer to version 14, because that's the version that the build instructions tell us to run.

Third, after building the Roslyn binaries, csc.exe still does not run because prepare.bat has failed to turn off strong name verification on all relevant assemblies. At the very least, prepare.bat needs to disable strong name verification for:
  • Microsoft.CodeAnalysis.Desktop
  • Microsoft.CodeAnalysis.CSharp.Desktop
  • Microsoft.CodeAnalysis.VisualBasic.Desktop
I do not know if this is a complete list. These are just the ones that I got exceptions for. I still have not gotten vbsc.exe to work, even after fixing these bugs in the prepare script. I have not investigated further since I only use the C# compiler.

P.S. Having to debug command scripts is a terrible onboarding experience for a new developer. It really ought to work out-of-the-box.

The build instructions claim that "we have done the majority of our testing using the current CTPs and preview builds and recommend its use." This can't possibly be true, since it doesn't work if you install the current CTP.

It should be someone's job at Microsoft to periodically test the build instructions. Periodically, or every time a new Visual Studio "14" CTP is released, that person should start with a clean VM, install Windows, run through the instructions step-by-step, and make sure that they still work.


John2014 wrote Aug 16, 2014 at 5:19 PM

Same story.

eagan wrote Sep 17, 2014 at 4:00 AM


taoyue wrote Sep 21, 2014 at 5:30 AM

The reason that I filed a bug, rather than submitting a pull request, is that this isn't a complete fix. What I described above is simply the bare minimum needed to get Roslyn to build at all. After making these changes, the Visual Basic compiler still fails to run, it still doesn't integrate into the Visual Studio 14 CTP, and who knows what else is wrong.

Additional investigation is still needed, by someone who knows a lot more about the Roslyn build than I do.

See also the following bug and discussion. There's a lot more that's broken for people trying to build Roslyn outside Microsoft:
Nobody at Microsoft seems to be testing to make sure their instructions work for external users. Evidently, they don't use prepare.bat within Microsoft. That's how we ended up in a situation in which the #2 most-followed project on CodePlex doesn't build out-of-the-box, and hasn't for at least the last two months.