简体   繁体   中英

Command line compiling VB.NET project via Visual Studio?

I am trying to compile my Visual Basic .NET project named Myproject.sln via command line commands. I need to build and compile that solution.

My Visual Basic .NET compiler is called vbc.exe. Any idea how I do that thing?

I am using Visual Studio 2005 , and I have already read Microsoft's tutorial, " Building from the Command Line (Visual Basic) ".

The .NET framework (version 2 and above) comes with a command line build utility called MSBuild . You can use this to build your Visual Studio project/solution files.

From the command line:

msbuild Myproject.sln

只需运行MSBuild并将.sln文件指定为命令行选项:

msbuild myproject.sln /p:buildmode=release

You could look at using MSBuild. That's probably the best approach.

Your .sln file is a valid MSBUild project file, so if you open the Visual Studio command prompt from the start menu and browse to your project location,

 c:\...\msbuild MyFile.sln

... for example, it should just work.

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