You can use the Preserve attribute to tell the linker not to remove
something: http://android.xamarin.com/Documentation/Linking

On Mon, Sep 19, 2011 at 7:26 AM, Vladimir Dimitrov
<vlad.dimit...@gmail.com>wrote:

> I am still evaluating the monodroid and so far I managed to work around
> most problems but there is something with the linker that is causing types
> that I don’t refer directly but instead create using reflection to fail. The
> problem seems to be that the linker is simply not including them in the
> resulting assembly… is there a way to give a hint to the linker that a
> certain type should be included no matter what he thinks without turning off
> the linking or making a dummy reference somewhere to the class?****
>
> ** **
>
> Also there was a crash in the linker that caused me to switch off the
> linking and I am not sure if anybody noticed it:****
>
> ** **
>
>   C:\Program Files\MSBuild\Novell\mandroid.exe -v --nosign
> --sdk-dir="e:\Android\android-sdk"
> --builddir="E:\Projects\Work\Warehouse\IncoDroid\obj\x86\Debug\android"
> --framework-dir="C:\Program Files\Reference
> Assemblies\Microsoft\Framework\MonoAndroid\v2.2" --framework-dir="C:\Program
> Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0"
> -S="E:\Projects\Work\Warehouse\IncoDroid\obj\x86\Debug\res"
> --package="IncoDroid.IncoDroid"   --linksdkonly --abi="armeabi"
> --java-sdk-dir="C:\Program Files\Java\jdk1.6.0_27" --debug
> --sdk-platform="8"
> "E:\Projects\Work\Warehouse\IncoDroid\bin\x86\Debug\IncoDroid.dll"
> "E:\Projects\Work\Warehouse\Android.Business\bin\x86\Debug\Android.Business.dll"
> "E:\Projects\Work\Warehouse\Android.Data\bin\x86\Debug\Android.Data.dll"
> "C:\Program Files\Reference
> Assemblies\Microsoft\Framework\MonoAndroid\v2.2\Mono.Android.dll"
> "C:\Program Files\Reference
> Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll" "C:\Program
> Files\Reference
> Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Core.dll" "C:\Program
> Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll"
> "C:\Program Files\Reference
> Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.dll" "C:\Program
> Files\Reference
> Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.Linq.dll" ****
>
> monodroid : error 1: Mono.Linker.ResolutionException: Can not resolve
> reference: System.Boolean System.Threading.AutoResetEvent::Set()
> [E:\Projects\Work\Warehouse\IncoDroid\IncoDroid.csproj]****
>
>     at Mono.Linker.Steps.MarkStep.ResolveMethodDefinition
> (Mono.Cecil.MethodReference method) [0x00000] in <filename unknown>:0 ****
>
>     at Mono.Linker.Steps.MarkStep.MarkMethod (Mono.Cecil.MethodReference
> reference) [0x00000] in <filename unknown>:0 ****
>
>     at Mono.Linker.Steps.MarkStep.MarkInstruction
> (Mono.Cecil.Cil.Instruction instruction) [0x00000] in <filename unknown>:0
> ****
>
>     at Mono.Linker.Steps.MarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody
> body) [0x00000] in <filename unknown>:0 ****
>
>     at Mono.Linker.Steps.MarkStep.ProcessMethod
> (Mono.Cecil.MethodDefinition method) [0x00000] in <filename unknown>:0 ***
> *
>
>     at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in <filename
> unknown>:0 ****
>
>     at Mono.Linker.Steps.MarkStep.Process () [0x00000] in <filename
> unknown>:0 ****
>
>     at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context)
> [0x00000] in <filename unknown>:0 ****
>
>     at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context)
> [0x00000] in <filename unknown>:0 ****
>
>     at MonoDroid.Tuner.Linker.Run (Mono.Linker.Pipeline pipeline,
> Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0 ****
>
>     at MonoDroid.Tuner.Linker.Process (MonoDroid.Tuner.LinkerOptions
> options, Mono.Linker.LinkContext& context,
> System.Collections.Generic.List`1& assemblies) [0x00000] in <filename
> unknown>:0 ****
>
>     at Monodroid.Scanner.LinkAssemblies (Monodroid.Arguments args,
> System.Collections.Generic.List`1& assemblies) [0x00000] in <filename
> unknown>:0 ****
>
>     at Monodroid.Droidinator.CreateApk () [0x00000] in <filename unknown>:0
> ****
>
>     at Monodroid.MainClass.Main (System.String[] argv) [0x00000] in
> <filename unknown>:0 ****
>
> Done Building Project
> "E:\Projects\Work\Warehouse\IncoDroid\IncoDroid.csproj" (SignAndroidPackage
> target(s)) -- FAILED.****
>
> ** **
>
> Thanks,****
>
> Vladimir****
>
> _______________________________________________
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
>
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to