Skip to content

Commit 0f82b99

Browse files
authored
[Xamarin.Android.Cecil] More chained MSBuild fixes
Proving once again that I'm cursed -- or that I don't have consistent development environments, take your pick -- the fix attempted in commit f1dd3da didn't work as expected, with a (patched) `msbuild`-using invocation from `xamarin-android` failing with a truly bizarre path: # in `xamarin-android` $ make MSBUILD=msbuild V=1 ... CSC : error CS0006: Metadata file `@D@/bin/Debug/Xamarin.Android.Cecil.dll' could not be found where `@D@` was `path/to/xamarin-android/../..`, i.e. a directory that would never contain `Xamarin.Android.Cecil.dll`. (Not sure why f1dd3da appeared to work before, but that was a different machine, which is why I'm cursed.) Update `$(OutputPath)` within `src/Xamarin.Android.Cecil/Xamarin.Android.Cecil.targets` so that it uses `$(MSBuildThisFileDirectory)` to get a consistent directory. That *appears* to allow xamarin-android compilation to continue when building with `msbuild`.
1 parent f1dd3da commit 0f82b99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Xamarin.Android.Cecil/Xamarin.Android.Cecil.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<CecilDirectory>$(MSBuildThisFileDirectory)\..\..\external\cecil</CecilDirectory>
55
<CecilPreparedFlag>prepared.flag</CecilPreparedFlag>
6-
<OutputPath Condition=" '$(OutputPath)' == '' ">..\..\bin\$(Configuration)</OutputPath>
6+
<OutputPath Condition=" '$(OutputPath)' == '' ">$(MSBuildThisFileDirectory)\..\..\bin\$(Configuration)</OutputPath>
77
<CecilOutputPath>$([System.IO.Path]::GetFullPath ('$(OutputPath)'))</CecilOutputPath>
88
<CecilAssemblies>$(OutputPath)\Xamarin.Android.Cecil.dll;$(OutputPath)\Xamarin.Android.Cecil.Mdb.dll</CecilAssemblies>
99
</PropertyGroup>

0 commit comments

Comments
 (0)