Disclaimer: Since I am talking about Orcas, and as of yet unreleased software, what follows is subject to change.
So if you were curious enough to dig into what the October 2006 Orcas CTP contained, you might have seen something related to MSBuild - namely, Multi-Targeting. Here's what the release notes for the CTP says, with respect to MSBuild and Multi-Targeting:
MSBuild Multi-targeting: Support multitargeting within the IDE by enabling Visual Studio to leverage MSBuild using the tasks and targets that were shipped in Visual Studio 2005. Additionally, command line solutions will build using the toolset appropriate for the .NET Framework version that is being targeted.
I just wanted to provide more clarity around what this means, because it does not entirely present an accurate picture. To make things worse, the topic of multi-targeting itself is a bit cloudy and confusing, so I want to shed some light on the big picture.
Firstly, multi-targeting support within Visual Studio Orcas is not entirely available in the October CTP just yet. The MSBuild support is all there, but the IDE features to leverage it fully are still in development. However, MSBuild is entirely capable of multi-targeting as described, so I’ll try to distill what “multi-targeting” means as it relates to MSBuild.
By the time Orcas releases, there will be three different frameworks that will be available to you for building your applications:
What makes things even more interesting is that by the time Orcas ships, there will only be two toolsets that can build code for these three frameworks, so toolsets and frameworks don’t exactly map one to one. By toolset, I am referring to the set of tools and build process that ships in the .NET Framework that allow you to build your code to run on the platform. The two toolsets are:
Today, you use the .NET Framework 2.0 toolset to build code targeting .NET Framework 2.0 and .NET Framework 3.0. Also, MSBuild version numbers line up with the version of the framework that it ships in - so we are calling MSBuild that you already use today as 2.0, and the Orcas version is currently called MSBuild 3.5.
In order to provide a compelling upgrade story and an easy migration scenario between Visual Studio 2005 and Visual Studio Orcas, we (MSBuild team) had to follow a few ground rules without compromise. It turns out that these rules also boil down to fundamental principles that any good build tool should adhere to:
So how does all of this manifest itself in the Orcas CTP that I started this little post with? That's the fun part.
The Orcas tools are installed in the %windir%\Microsoft.Net\Framework\v3.5.xxxxx. That's where the new version of MSBuild lives in Orcas (at least for now - remember, this is all very preliminary and subject to change as we tweak things). MSBuild 3.5 is entirely side by side with MSBuild 2.0. Here's a quick rundown of what it means to use MSBuild 3.5:
I've tried to show the side by side aspects in the figure below. Note that MSBuild 2.0 cannot use the 3.5 toolset, but MSBuild 3.5 can consume both toolsets.
In summary, here are the key takeaways
That's just the start of it - there's a ton of functionality in there, and I will cover it over the coming weeks. Please let us know what you think about all of this, as gathering feedback is the primary purpose of releasing CTPs. Like I mentioned earlier, as is with any pre-release software, keep in mind that all of this could change based on what you tell us and based on what we find!
[ Author : Faisal Mohamood ]