Compiling a .vbproj or .csproj project file without Visual Studio

試著忘記壹切 提交于 2019-11-30 08:19:24

MSBuild is the easiest way to go. For instance:

msbuild /property:Configuration=Release MyFile.vbproj

MSBuild can also take your solution file and use it to do the compile.

You can use either MSBUILD or CSC. MSBuild, which as you mentioned, does use your project and solution files. CSC will compile specific files, or all files in a specific directory tree.

You should also look at automating your builds with NAnt and/or CruiseControl.net.

Also, here is an example on how to compile your code without visual studio using CSC. http://blog.slickedit.com/?p=163

Just so you know .vbproj and .csproj files are MSBuild. So everything that you've read, you can apply to those files directly.

Sayed Ibrahim Hashimi

My Book: Inside the Microsoft Build Engine : Using MSBuild and Team Foundation Build

In project solution folder:

msbuild wpfapp1.sln /p:BuildProjectReferences=true

MSbuild is usually located in:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319

(or something similar, depending on the version)

csc.exe compiles files, msbuild compiles projects and solutions

At the top of a .vbproj file is a . Add this line to the property group to suppress the VB runtime:

<NoVBRuntimeReference>On</NoVBRuntimeReference>

MSBuild does the rest. No need to use the command line if you have the IDE.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!