[xbuild] Add support for multi-targeting arbitrary frameworks.
authorAnkit Jain <radical@corewars.org>
Sun, 27 Feb 2011 21:27:17 +0000 (02:57 +0530)
committerAnkit Jain <radical@corewars.org>
Sun, 27 Feb 2011 21:40:15 +0000 (03:10 +0530)
commit1ff11121a4ab863ded1dd68a2f3f98ec2b5b7b1b
treebc51cc9a35c1a8197ba637394db25bbfc150b750
parent35044c74a25b2c3c983ceca94f5163fa309a495c
[xbuild] Add support for multi-targeting arbitrary frameworks.

ToolsVersion 4.0 supports targeting arbitrary frameworks defined
by FrameworkList.xml files and referenced by $(TargetFrameworkMoniker),
which is of the format:
 Identifier,Version=<version>[,Profile=<profile>]

built as:
 $(TargetFrameworkIdentifier),Version=$(TargetFrameworkVersion)[,Profile=$(TargetFrameworkProfile)]

eg. '.NETFramework,Version=v4.0' .

Frameworks are searched for in (order):

  1. Paths specified in the environment variable $XBUILD_FRAMEWORK_FOLDERS_PATH
  2. /Library/Frameworks/Mono.framework/External/xbuild-frameworks on Mac OSX.
  3. MSBuild property $(TargetFrameworkRoot)
  4. $prefix/lib/mono/xbuild-frameworks (default location)

.NET frameworks 2.0/3.0/3.5/4.0 have corresponding FrameworkList.xml
files now, which allows projects to target them. Custom frameworks like
MonoDroid can install suitable FrameworkList.xml files, and projects
can target them using the correct $(TargetFrameworkIdentifier) and
$(TargetFrameworkVersion).

Update man page.
12 files changed:
man/xbuild.1
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks.dll.sources
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetReferenceAssemblyPaths.cs [new file with mode: 0644]
mcs/tools/xbuild/Makefile
mcs/tools/xbuild/xbuild/2.0/FrameworkList.xml [new file with mode: 0644]
mcs/tools/xbuild/xbuild/2.0/Microsoft.Common.targets
mcs/tools/xbuild/xbuild/3.5/FrameworkList.xml [new file with mode: 0644]
mcs/tools/xbuild/xbuild/3.5/Microsoft.Common.targets
mcs/tools/xbuild/xbuild/4.0/FrameworkList.xml [new file with mode: 0644]
mcs/tools/xbuild/xbuild/4.0/Microsoft.Common.targets
mcs/tools/xbuild/xbuild/4.0/Microsoft.Common.tasks
mcs/tools/xbuild/xbuild/FrameworkList-3.0.xml [new file with mode: 0644]