编译没有Visual Studio的.vbproj或.csproj项目文件 [英] Compiling a .vbproj or .csproj project file without Visual Studio

查看:573
本文介绍了编译没有Visual Studio的.vbproj或.csproj项目文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一种方法可以直接编译.vbproj或.csproj项目文件,就像Visual Studio一样?



在Visual Studio中编译时, 窗口显示对编译器的实际调用,通常看起来像这样:



vbc.exe [选项集] [looooong .vb文件列表]



我想以编程方式调用某事,它将接受.vbproj文件,并做任何Visual Studio来生成这个长的命令行。我知道我可以自己解析.vbproj并生成该命令行,但我宁愿保存自己所有的逆向工程和试验和错误...



有没有工具来做这个?我宁愿能够在没有安装Visual Studio的机器上做。但是,如果有一个方法可以调用Visual Studio的一些参数来做到这一点,那也很好。



我简单看了一下MSBuild,它看起来像它工作从一个.proj项目文件,我必须做,特别是,我需要更新每次我添加一个文件到.vbproj文件。



任何帮助将非常感谢

$(我确实看了一下 b $ b

解决方案

MSBuild是最简单的方法。例如:

  msbuild / property:Configuration = Release MyFile.vbproj 
pre>

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

解决方案

MSBuild is the easiest way to go. For instance:

msbuild /property:Configuration=Release MyFile.vbproj

这篇关于编译没有Visual Studio的.vbproj或.csproj项目文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆