How to run Ant inside Visual Studio 2008?

2019-05-13 23:58发布

问题:

I'm wondering if anyone out there has any ideas about how to run Ant inside Visual Studio 2008. I'm looking to perform some pretty common Ant tasks such as selecting a target to run inside a build file.

I have come across and am aware of NANT as well as MSBUILD as more preferred build tools for ASP.NET projects, but I am only interested in some ideas about running Ant within the IDE.

Thanks in advance!

回答1:

As a quick and dirty solution you could add it using the External Tools... option in the Tools menu.

You can then see the Ant output in the Output window, and you can pass it various things like the current Project directory on the command line.

You can also assign keyboard shortcuts to the Tools.ExternalCommandXX commands which represent the external tools in the Tools menu.