UPDATE: The MSBuild Everett Environment (MSBEE) has just been announced! Soon this will be a (reasonably) supported scenario and we'll all be able to build both 1.1 and 2.0 versions of .NET code on Visual Studio 2005. Shiny.
更新: MSBuild Everett环境(MSBEE)刚刚宣布! 很快,这将是一个(合理地)受支持的方案,并且我们所有人都将能够在Visual Studio 2005上构建.NET代码的1.1和2.0版本。
I'm definitely digging the information on Jomo Fisher's MSBUILD blog. I've long been critical of MSBUILD calling it a "NAnt wanna-be" (usually in bitterness) because I'm SUCH a NAnt fan. However, while writing the book and working with VS.NET 2005 on the Coding4Fun articles I've grown to respect MSBUILD as an entity in its own right. More and more, I've been consistently impressed with it's flexibility and power.
我肯定是在Jomo Fisher的MSBUILD博客上挖掘信息。 我一直批评MSBUILD称其为“ NAnt想要的人”(通常是痛苦的),因为我很喜欢NAnt的粉丝。 但是,在撰写本书并在VS.NET 2005上使用Coding4Fun文章时,我逐渐尊重MSBUILD作为一个实体。 越来越多的灵活性和强大的功能给我留下了深刻的印象。
Here's some gems from Jomo's site:
这是乔莫(Jomo)网站上的一些瑰宝:
Programmatically Converting older Projects to MSBuild - This kicks ass:
以编程方式将较旧的项目转换为MSBuild-这会踢屁股:
Programmatically Converting older Projects to MSBuild - This kicks ass:using System;using System.Text;using Microsoft.Build.Conversion;class ConvertProject{ static void Main(string[] args) {
ProjectFileConverter c = new ProjectFileConverter(); c.OldProjectFile = args[0]; c.NewProjectFile = args[1]; c.Convert(); }
}以编程方式将较旧的项目转换为MSBuild-这有点麻烦:使用系统; 使用System.Text; 使用Microsoft.Build.Conversion; 类ConvertProject { 静态void Main(string [] args) {ProjectFileConverter c =新的ProjectFileConverter(); c.OldProjectFile = args [0]; c.NewProjectFile = args [1]; c.Convert(); } }
Using VS.NET to target .NET 1.1 - A great and very visceral example of how the .targets system works. Additional info at Jon Galloway's blog who linked to Armand's blog. I ended up using Armand's "Everett Target" installer and it worked great with RTM. Armand's installer is a roll-up of Jomo's sample.
使用VS.NET定位.NET 1.1-一个很好的示例,说明.targets系统如何工作。 乔恩·加洛韦( Jon Galloway)博客中的其他信息,该博客链接到Armand的博客。 我最终使用了Armand的“ Everett Target”安装程序,它与RTM一起使用时效果很好。 Armand的安装程序是Jomo的示例的汇总。
Disclaimer: This target doesn't support COM references, Web references and a few other cases. But it sure proves the concept!
免责声明:此目标不支持COM引用,Web引用和其他一些情况。 但这肯定证明了这个概念!
ACTION REQUIRED (That means you blog reader!): Clichten is looking for feedback on this very issue. Should Microsoft offer rich target support for ISVs and vendors to target 1.1 with VS.NET 2005? Damn right they should.
需要采取的措施(这意味着您是博客读者!): Clichten正在寻求有关此问题的反馈。 微软是否应该为ISV和供应商提供丰富的目标支持,以将VS.NET 2005定位到目标1.1? 他们该死的对。
If you care about this issue, go make your voice heard!
如果您关心此问题,请发表声音!
Other MSBUILD loveliness from elsewhere on the 'Net:
MSBUILD在网上的其他方面的可爱之处:
Gustavo Guerra has a .targets file that adds 11 new targets to VS.NET 2005 including Mono. I suspect we're going to see some amazing stuff happening around targets. It'll be interesting to see how far it goes.
Gustavo Guerra拥有一个.targets文件,该文件向VS.NET 2005添加了11个新目标,其中包括Mono 。 我怀疑我们会在目标周围看到一些惊人的事情。 看看它能走多远会很有趣。
Speculation: Could this flexibility make VS.NET 2005 an Eclipse competitor by enabling non-.NET targets?
推测:这种灵活性是否可以通过启用非.NET目标使VS.NET 2005成为Eclipse的竞争对手?
SharpDevelop (an alternate free .NET IDE) ships with two custom MSBuild Tasks for Mono explains Matt Ward. It takes a different tack than Gustavo's .target file. Instead the custom tasks do the actual work of compiling the code and delegating to MCS (the Mono compiler)
SharpDevelop (另一种免费的.NET IDE)附带了两个针对Mono的自定义MSBuild任务, Matt Ward对此进行了解释。 与Gustavo的.target文件使用不同的方法。 相反,自定义任务执行编译代码并委派给MCS(Mono编译器)的实际工作。
Robert McLaws continues to push the MSBUILD envelope. Robert's MSBuild toolkit may be the engine on top of the engine. He adds a much-needed MSBUILD Configuration option to the Solution Explorer. He says, Watch this space. And I watch.
Robert McLaws继续推动MSBUILD的发展。 Robert的MSBuild工具包可能是引擎之上的引擎。 他向解决方案资源管理器中添加了急需的MSBUILD配置选项。 他说,注意这个空间。 我看着。
翻译自: https://www.hanselman.com/blog/building-net-11-projects-using-visual-studio-2005