locked
Using VS back end compiler as part of custom compiler? RRS feed

  • Question

  • Hello.

    My project group and I are currently developing our first compiler for our own programming language. We have made a simple game engine, where you load up two DLLs and the Game Engine makes the two AIs battle. Our language is concerned with writting the AI, which our custom compiler then is supposed to compile into a DLL file.

    After researching MSIL, we decided it would be too great of an undertaking for us to compile directly to MSIL and therefore we wanted to compile to C# and then utilize VS backend compiler to compile our intermediate file to a DLL file written in MSIL.

    I have been searching the forums and reading the EULA, but I am not certain if we are violating any rights by using the backend compiler of Visual Studio this way. As far as I can understand, we would need to grab a .exe file from an installation of Visual Studio and include in our compiler. When compiling a source file, our compiler would then first compile to C# and then utilize the .exe file to finish the compilation and produce the DLL written in MSIL.

    Thank you in advance for your answer :)


    Monday, May 20, 2013 11:43 AM

All replies

  • Hi,

    this forum is about Microsofts 'Training and Certification'. For better help and support you should ask your question in the appropriate forum.


    Best Regards. When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer. This helps us build a healthy and positive community.

    @Horizon_Net | Blog

    Monday, May 20, 2013 4:18 PM
  • I am almost positive it would be a violation of the EULA to release the VS compiler embedded or in any way as part of your own "translator." However, I don't see why requiring an installation of VS Express (which includes the C# compiler) would be an issue.
    Tuesday, May 21, 2013 7:44 AM
  • Hi,

    The .NET Framework (or maybe the .NET Framework SDK, not sure at this point) contains the C# command-line compiler csc.exe, so you don't need Visual Studio. See:

    Working with the C# 2.0 Command Line Compiler
    http://msdn.microsoft.com/en-us/library/ms379563%28VS.80%29.aspx

    Other line of investigation could be Roslyn (currently CTP status), that is, "Compilers as services":

    http://msdn.microsoft.com/en-us/vstudio/roslyn.aspx



    MZ-Tools: Productivity add-ins for Visual Studio: http://www.mztools.com. My blog about developing add-ins: http://msmvps.com/blogs/carlosq/

    Tuesday, May 21, 2013 8:17 AM
  • Just use MsBuild, it comes with the .Net Framework.

    Visual Studio itself uses MsBuild under the hood.

    .csproj files are infact MsBuild input files.

    Wednesday, May 22, 2013 8:17 AM
  • Do you mean to say that it wouldnt violate the EULA of Visual Studio Express, if we took the csc.exe file from VS Express and included in our translator?

    Or that we wouldnt violate the EULA if we assume the target computer has a copy of VS Express?

    And Thanks for your answer :)
    • Edited by Tonaplo Thursday, May 23, 2013 7:54 AM
    Thursday, May 23, 2013 7:53 AM
  • And using these can be done without breaking any terms and conditions in the EULA? Do you know?

    And thanks for your answer :)

    • Edited by Tonaplo Thursday, May 23, 2013 7:54 AM
    Thursday, May 23, 2013 7:53 AM