Call the command line to generate a Visuial Studio.net project, solution

xiaoxiao2021-03-06  43

Recently considering joining the Daily Build function in a project management tool, study the command line compilation mode of the vs.net2003. I used to write a DAILY building tool specifically for VB6.0, why didn't I do a common? First, general mode is often more complicated, not well written. Second, there is a lot of articles about the compilation of the command line at that time. They have to teach me to manually write a module. If there is a reference to an Assembly or any resource file, you have to manually link ... but it is okay. I finally studied a little small results, so quickly and everyone, I hope to help some friends! Basic Technical Introduction: The command line is compiled, and the DEVENV.EXE file is mainly used in the "Microsoft Visual Studio .Net 2003 / Common7 / IDE /" directory. Usage: devenv [SolutionFile | Projectfile | Anyfile.ext] [Switches]

You can call DEVENV, specify solution files or project files with the first parameter. You can also call DEVENV to make the first parameter as any other type of file to be opened in the editor. If the project file is provided, the IDE will find the project file in the context of the solution with the project file in the same directory as the project file, open the project file in the context of the solution. If there is .sln file, the IDE will look up a single .sln file that references the item. If there is no such a single .sln file, the IDE will create an unsaveful solution with the default .sln file name, and the default file name has the same base name as the project file.

Command line generation: devenv solutionfile.sln / build solutionconfig [/ project Projectnameorfile [/ Projectconfig name]]]]]

Available command line switch:

/ Build Generates Specified Solution Configuration / Project Specifies Generating Projects Instead of Solution To specify / build to use / project / projectconfig Specify that the project configuration to be generated must specify / project to use / projectConfig / OUT to write the specified result Document / Rebuild and / Build Similar, but first enforce the mandatory cleaning / Clean cleaning generation result / deploy generates the specified solution configuration and then deploy it / run run the specified solution Configuration / Runexit Run the specified solution configuration and then terminate / command startup After executing the specified internal command line / mditabs Using tab Document interface / MDI Using MDI interface / FN Using the specified font name / fs Using the specified font size / LCID Using the specified language ID / NOVSIP Disable VSIP for VSIP test Developer License Key / SafeMode For stability, only the default environment and service / ResetskipPKGS allows the VSPackages that have been marked as load failed to load / migrateSettings to migrate some users in another version to set product-specific switches:

/ debugexe Opens the specified executable to be debugged. The rest of the command line is passed to this execution file as its parameters. / UseNV uses Path, include, libpath, and lib environment variables instead of using the IDE path generated by VC .

To attach a debugger from the command line, use: vs7jit.exe -p Tip: You can pass the "Start Menu" -> Program "->" Microsoft Visual Stuido .NET 2003 "->" Visual Studio. NET Tools "->" Visual Stuido .NET 2003 Command Tips "Start the command line operation window, in fact, we usually enter the start-up command line window through CMD, but you can use DEVENV directly below, do not point to the path. Practice Project 1: Compiling the entire solution through the command line to assume now there is such a solution, c: /testcommandline/testcommandline.sln. Enter the following command line in the command line, you can compile the Release version of this solution. To get the debug version, replace Release to Debug: Devnev C: /TestCommandline/testcommandline.sln / build releaseps: .NET 2003 The following MFC, C #, ASP.NET, VB.NET test passes, which can only include a project, or a large application of the N-layer architecture. Practice Project 2: Compiling a project in a solution by command line Hypothesis now has such a solution (C #), c: /tecombmandline/testcommandline.sln, which contains 2 items: one is Project1.csproj, another Is Project2.csproj, can compile Project1 Release version by the following command line: Devnev C: /TestCommandline/testcommandline.sln / build recaMMandLine.sln / build recaMMandline/testcommandline.csprojps: If this project references a project, then The project will also be compiled once. Practice Project 3: Clean up the MFC Solution Enter the following command line will clean the RELEASE version of the solution: Devnev C: /TestCommandline/testcommandline.sln / Clean Releaseps: .NET project does not clean up this feature, but traditional Win32, MFC is available. Practice Project 4: Generate a solution while writing log files If you want to generate a log file, you can simply add / out logfilename.log on the command line. Devnev c: /testcommandline/testcommandline.sln / build release / out c: /testcommandline/buildlog.log In fact, DEVNEV has a lot of features, then leave it to everyone!

November 28, November 28, Zhang Yuxiang

转载请注明原文地址:https://www.9cbs.com/read-86924.html

New Post(0)