简体   繁体   中英

How to execute Visual Studio Project with MSBuild ? (VB.Net Project)

Aim to Acheive : I want to execute my application from msbuild as it shows a lot of helpful information about the execution including the most important the Time of Execution .

I have :

  • A Visual Studio Project, and I use Ctrl+F5 to execute my application in Visual Stdio.

  • I want to execute the same Ctrl+F5 execution from the command prompt using MSBuild command.

  • I prefer not to write my own Msbuild execution task for this and want to use the task that Visual Studio uses to do Ctrl+F5.

How do you do it from command prompt using MSBuild ?

I Build my projects with MSBuild as :

C:\project> msbuild project.vbproj /t:"Clean;Build"

Now, how to execute it with MSBuild ?

You can use the <Exec> task... or you could just run the program from the command line explicitly, of course. (I'd only put it in the build file if executing it was naturally part of the build - eg an early part of the build created a tool which was then used to preprocess a resource for a later part of the build.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM