Skip to content

Instantly share code, notes, and snippets.

@radical
Created March 21, 2011 18:20
Show Gist options
  • Save radical/879918 to your computer and use it in GitHub Desktop.
Save radical/879918 to your computer and use it in GitHub Desktop.
commit 61fb5ccb9a0ef965ccee6d889b7c373962f879a7
Author: Ankit Jain <[email protected]>
Date: Mon Mar 21 23:53:12 2011 +0530
Fix Novell.MonoDroid.Common.targets to work with VS.
GetReferenceAssemblyPaths target performs the framework directory
lookup, based on target framework moniker. xbuild from master supports
this, but the released versions do not. So, monodroid
build doesn't use monikers with xbuild. GetReferenceAssemblyPaths
was (incorrectly) being overridden on Unix/xbuild earlier
to avoid that. In such a case, the target framework directories were
set by GetFrameworkPaths (which we override).
So, don't override GetReferenceAssemblyPaths.
Instead, now set $(_TargetFrameworkDirectories) in GetFrameworkPaths
on unix. GetReferenceAssemblyPaths target will ignore the moniker if this
property is non-empty. This should allow the target files to work
with msbuild, and with released versions of xbuild. And when we do
add support for monikers in monodroid build, we can remove this.
diff --git a/tools/msbuild/Novell.MonoDroid.Common.targets b/tools/msbuild/Novell.MonoDroid.Common.targets
index 7fd24d0..91c2b63 100644
--- a/tools/msbuild/Novell.MonoDroid.Common.targets
+++ b/tools/msbuild/Novell.MonoDroid.Common.targets
@@ -79,11 +79,13 @@ Copyright (C) Novell. All rights reserved.
</CreateProperty>
<CreateProperty Value="@(TargetFrameworkDirectories)">
<Output TaskParameter="Value" PropertyName="TargetFrameworkDirectory"/>
+ <!-- Workaround: Set $(_TargetFrameworkDirectories), so that GetReferenceAssemblyPaths doesn't
+ try to resolve the $(TargetFrameworkMoniker), as this target file doesn't support that
+ with xbuild, yet. -->
+ <Output TaskParameter="Value" PropertyName="_TargetFrameworkDirectories" Condition="'$(OS)' == 'Unix'"/>
</CreateProperty>
</Target>
-<Target Name="GetReferenceAssemblyPaths" Condition="'$(OS)' == 'Unix'" />
-
<!--
*******************************************
Application Build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment