Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Is there a way to compile a .vbproj or .csproj project file directly, just like Visual Studio does?

When you compile in Visual Studio, the "output" window shows the actual call to the compiler, which normally looks like:

vbc.exe [bunch of options] [looooong list of .vb files]

I would like to programatically call "something" that would take the .vbproj file and do whatever Visual Studio does to generate this long command line. I know i could parse the .vbproj myself and generate that command line, but I'd rather save myself all the reverse engineering and trial-and-error...

Is there a tool to do this? I'd rather be able to do it in a machine without having Visual Studio installed. However, if there's a way to call Visual Studio with some parameters to do it, then that'll be fine too.

I looked briefly at MSBuild, and it looks like it works from a .proj project file that i'd have to make especially, and that I'd need to update every time I add a file to the .vbproj file. (I did look briefly at it, so it's very likely I missed something important)

Any help will be greatly appreciated

like image 577
Daniel Magliola Avatar asked Nov 05 '08 19:11

Daniel Magliola


People also ask

How do I open a SLN file without Visual Studio?

Solution 1 Basically a solution file can be opened by using appropriate IDE (development enviornment) For Example you need visual studio to open . net related sln file. You can also use NOTEPAD to just open and read the content of sln file.

How do I run a VBPROJ file?

How to open a VBPROJ file. VBPROJ files are meant to be opened and edited in Microsoft Visual Studio (Windows, Mac) as part of Visual Studio projects. However, because VBPROJ files are XML files, you can open and edit them in any text or source code editor.


1 Answers

MSBuild is the easiest way to go. For instance:

msbuild /property:Configuration=Release MyFile.vbproj 
like image 55
cpak Avatar answered Sep 30 '22 18:09

cpak