开发者

MSBuild - How do I use Visual Studio to create/edit a build script?

I can't seem to find how to create an MSBuild script from with开发者_如何学Goin Visual Studio. Anyone know how? I'm using VS Professional.


Start with this as a skeleton for your file,

<?xml version="1.0" encoding="utf-8"?>
<Project
   xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
   ToolsVersion="4.0"
   DefaultTargets="Build">

   <Target Name="Build">
      <Message Text="Building..." />
   </Target>

</Project>


Make sure the file extension is .msbuild and not .xml this will enable the intellisense.


I don't have any trouble (VS 2010 Premium). A standard MSBUILD file is an XML file, so opening it using File -> Open -> File should open it in the XML editor in VS. Then you can edit, add it to a project or whatever as you need.

I'm not sure if you need a certain edition for the Intellisense to work.


You can also use this awesome tool: http://www.attrice.info/msbuild/


MSBuild itself is pretty straightforward so it is pretty simple to do it in any text/xml editor.

BTW, MSDN Walkthrough: Creating an MSBuild Project File from Scratch does not tell anything about Visual Studio and just provides tips how-to write script in editor.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜