Results 1 to 6 of 6

Thread: Smart .NET Command-Line Compiler Interface... do you like?

  1. #1

    Thread Starter
    Fanatic Member Redth's Avatar
    Join Date
    May 2001
    Location
    Ontario, Canada
    Posts
    551

    Smart .NET Command-Line Compiler Interface... do you like?

    Hey guys,

    I've recently needed to know how to compile vb apps from the commandline with the command line compiler... in doing so, i've learned a lot of the commandline parameters and what they do... i also learned that a program to use this commandline compiler would be quite useful...

    So, i'm almost done building a front end program to do just so.... wondering how many people would be interested in such a thing if i were to release it to the public... has lots of options... here's a preview picture of it:


    Basically it can take .vb or .cs files, and compiles them into an exe file... lots of options as you see in the pic... and perhaps more if anybody finds them very useful...
    Attached Images Attached Images  

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    I actually started on that myself once a long time ago. Never had the time to real do much with it. But yeah plenty of people would find that a useful tool.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3

    Thread Starter
    Fanatic Member Redth's Avatar
    Join Date
    May 2001
    Location
    Ontario, Canada
    Posts
    551
    alright, i've dug through the vbc.exe /help information and here's what i've got in the program so far:



    /out:<file> Specifies the output file name.
    /target:exe Create a console application (default). (Short form: /t)
    /target:winexe Create a Windows application.
    /target:library Create a library assembly.
    /target:module Create a module that can be added to an assembly.

    - INPUT FILES -
    /addmodule:<file> Reference metadata from the specified module.
    /recurse:<wildcard> Include all files in the current directory and subdirectories according to the wildcard specifications.
    /reference:<file_list> Reference metadata from the specified assembly. (Short form: /r)

    /optimize[+|-] Enable optimizations.
    /removeintchecks[+|-] Remove integer checks. Default off.

    /optionexplicit[+|-] Require explicit declaration of variables.
    /optionstrict[+|-] Enforce strict language semantics.
    /optioncompare:binary Specifies binary-style string comparisons. This is the default.
    /optioncompare:text Specifies text-style string comparisons.

    /bugreport:<file> Create bug report file.
    /main:<class> Specifies the Class or Module that contains Sub Main. It can also be a Class that inherits from System.Windows.Forms.Form. (Short form: /m)


    here's a list of ones that i plan to include yet:
    - RESOURCES -
    /linkresource:<resinfo> Links the specified file as an external assembly resource. resinfo:<file>[,<name>[,public|private]] (Short form: /linkres)
    /resource:<resinfo> Adds the specified file as an embedded assembly resource. resinfo:<file>[,<name>[,public|private]] (Short form: /res)
    /win32icon:<file> Specifies a Win32 icon file (.ico) for the default Win32 resources.
    /win32resource:<file> Specifies a Win32 resource file (.res).

    - CODE GENERATION -

    /debug[+|-] Emit debugging information.
    /debug:full Emit full debugging information (default).
    /nowarn Disable warnings.
    /warnaserror[+|-] Treat warnings as errors.


    and finally, the rest below are ones that i don't know what exactly they are and am not sure if anyone would actually need them... if they do, please do tell me, i will make use of them if i know what they are:

    /debugdbonly Emit PDB file only.

    - ERRORS AND WARNINGS -
    - LANGUAGE -
    /define:<symbol_list> Declare global conditional compilation symbol(s). symbol_list:name=value,... (Short form: /d)
    /imports:<import_list> Declare global Imports for namespaces in referenced metadata files. import_list:namespace,...

    /rootnamespace:<string> Specifies the root Namespace for all type declarations.

    - ADVANCED -
    /baseaddress:<number> The base address for a library or module (hex).
    /delaysign[+|-] Delay-sign the assembly using only the public portion of the strong name key.
    /keycontainer:<string> Specifies a strong name key container.
    /keyfile:<file> Specifies a strong name key file.
    /libpath:<path_list> List of directories to search for metadata references. (Semi-colon delimited.)
    /utf8output[+|-] Emit compiler output in UTF8 character encoding.
    @<file> Insert command-line settings from a text file.



    /addmodule:<file> Reference metadata from the specified module.
    /reference:<file_list> Reference metadata from the specified assembly. (Short form: /r)

    appreciate any help and comments about this... sounds like i'll make it finished and put it up somewhere for the public.... also, i'm still trying to devise a way to capture the console output of vbc.exe... if anyone knows how this can be done, i'd like to know!

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    It would be very kind of you to share it here with us Redth !thanx

  5. #5
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    ok
    /keyfile is for pointing to ...well key file when creating a strong assembly name for the application. Usually used for security reasons and if if it is going to be registered into the GAC. Just have a dialog box to select the file

    /reference is a list of .dll's you reference in the app all seperated by commas. You could have it bring up an open dialog box to select dll's they want to reference. You can also get funky and search the reference node in the .vbproj file to get a list of references if they want to compile an app written in the IDE.

    /imports is actually prety self explanatory, a list of Namespaces being imported just like when you say Imports System.Data in your code. I wouldnt include this one because a coder should really define their Imports in their code anyway.

    @ is for selecting a text file that already has the command line stuff you need for compiling. Useful way to use this is to have an option to save a template of selected compiling option so that the user can load up the file instead of reselcting all the stuff they need and you could just use this file with this parameter.

    That's the only ones I know
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  6. #6

    Thread Starter
    Fanatic Member Redth's Avatar
    Join Date
    May 2001
    Location
    Ontario, Canada
    Posts
    551
    ok,

    this project is turning out to be a lot bigger/more work than i thought... but i think once done, it would be a cool project... soo,


    this is my plan... well, sorta, i could go two ways... originally, iwas thinking of making my own project file format to save projects for the compiler... and Cander, you brought up the good idea of playing with a proj file made from the IDE... i like this idea, and upon looking at the structure of a .proj file, it's simple xml and quite readable... i think i may just use those files to work with...

    that way i can read/save proj files... that almost leads me on to wanting to make a simple IDE for the thing at the same time.. but for now, i'll stick to the compiler..

    and thanks again Cander, for the defenitions of some of those parameters. i will include them now!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width