Thanks for the link provided. However, it mentions only compiling of individual VB source file and doesn't mention anything about compiling the whole project. Is that possible to do batch compile for projects just like what we used to do with VB6?
Are you using Visual Studio? What files are you trying to compile. The *.vb files are what get compiled into the dll, so the vbc can compile these for you. You don't use the vbc to compile at a project level. After compiling your vb files, the dll needs to be in the bin directory.
I'm not sure how to do what you are asking, if it can even be done, but I think that you mean what I said above.
You can invoke devenv with a first argument to specify a solution file or
project file. You can also invoke devenv with a first argument that is any
other kind of file that you just want to open in an editor. When you supply a
project file, the IDE opens it in the context of a solution by looking for a
.sln file with the same base name as the project file in the same
directory as the project file. If no such .sln file exists, then the IDE
looks for a single .sln file that references the project. If no such single
.sln file exists, then the IDE creates an unsaved solution with a default .sln
file name that has the same base name as the project file.
Command line builds:
devenv solutionfile.sln /build solutionconfig [ /project projectnameorfile [ /projectconfig name ] ]
Available command line switches:
/build build the specified solution configuration
/project specifies the project to build instead of solution
must specify /build to use /project
/projectconfig specifies project configuration to build
must specify /project to use /projectconfig
/out write build output to specified file
/rebuild like /build but forces a clean first
/clean clean up build outputs
/deploy build the specified solution configuration and then deploy it
/run run the specified solution configuration
/runexit run the specified solution configuration and then terminate
/command executes the specified internal command line after startup
/mditabs use tabbed documents interface
/mdi use MDI interface
/fn use specified font name
/fs use specified font size
/LCID use specified language ID
/noVSIP disables VSIP developers license key for VSIP testing
/safemode only default environment and services load for stability
/resetskippkgs allow VsPackages once flagged for loading failures to
load again
/migratesettings migrate some user settings from another version
Product-specific switches:
/debugexe Open the specified executable to be debugged. The
remainder of the command line is passed to this
executable as its arguments.
/useenv Use PATH, INCLUDE, LIBPATH, and LIB environment variables
instead of IDE paths for VC++ builds.
To attach the debugger from the command line, use:
vs7jit.exe -p <pid>
C:\Documents and Settings\chiph\Desktop>
[/tt]
Chip H.
If you want to get the best response to a question, please check out FAQ222-2244 first
I think what you provided are pretty much close to what I need. However when I tried the following command syntax (after I set path to devenv.com and chdir to where my solution and project files are):
devenv test.sln /build
then I got the error:
Invalid solution configuration
and when I tried with:
devenv test.vbproj /build /project
then I got the error:
Missing switch argument. Configuration name required for /build switch
Did I miss anything? What exactly is the configuration name it talked about? I just want to build (compile) the solution file or the project file into an EXE in this case.
Could you or someone please provide me with the full and correct command syntax and an example of doing that?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.