Hi, That "when I get home" turned into a "tomorrow", but here is some more information:
With just a plain old PostSharp 2.1 install and a simple project I get this: Unhandled exception (2.1.3.3, 32 bit, CLR 2.0, Release): > PostSharp.Sdk.CodeModel.BindingException: Cannot find the type > 'System.Func`2' in assembly 'mscorlib, Version=2.0.0.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089'. > at PostSharp.Sdk.CodeModel.AssemblyEnvelope.GetTypeDefinition(String > typeName, BindingOptions bindingOptions) > at > PostSharp.Sdk.CodeModel.TypeRefDeclaration.GetTypeDefinition(BindingOptions > bindingOptions) > at > PostSharp.Sdk.CodeModel.TypeSpecDeclaration.GetTypeDefinition(BindingOptions > bindingOptions) > at PostSharp.Sdk.Extensibility.Tasks.IndexGenericInstancesTask.Execute() > at PostSharp.Sdk.Extensibility.Project.ExecutePhase(String phase) > at PostSharp.Sdk.Extensibility.Project.Execute() > at PostSharp.Hosting.PostSharpObject.ExecuteProjects() > at PostSharp.Hosting.PostSharpObject.InvokeProject(ProjectInvocation > projectInvocation) So following the tips of experts, I added a PostSharp.Custom.targets file to my solution folder: <?xml version="1.0" encoding="utf-8" ?> > <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> > <PropertyGroup> > > <PostSharpAssemblyBindingPolicySet>Silverlight20</PostSharpAssemblyBindingPolicySet> > </PropertyGroup> > </Project> This results in a new error: Unhandled exception (2.1.3.3, 32 bit, CLR 2.0, Release): > PostSharp.Sdk.CodeModel.AssemblyLoadException: Cannot load assembly > mscorlib_3. [Version mismatch] > ============ PostSharp Assembly Loading Log =================== > LOG: Finding the assembly with binding identity 'mscorlib, > version=5.0.5.0, culture=neutral, publickeytoken=7cec85d7bea7798e, > processorarchitecture=msil'. > LOG: Probing location 'C:\Program Files (x86)\Reference > Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll' because this > file was explicitly added to the search path. > LOG: File 'C:\Program Files (x86)\Reference > Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll' has identity > 'mscorlib, version=2.0.5.0, culture=neutral, > publickeytoken=7cec85d7bea7798e, processorarchitecture=msil'. > LOG: File 'C:\Program Files (x86)\Reference > Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll' does not > match the reference. > LOG: Probing location 'C:\Program Files (x86)\PostSharp > 2.1\Release\mscorlib.exe' because this directory is in the search path. > LOG: The file 'C:\Program Files (x86)\PostSharp 2.1\Release\mscorlib.exe' > could not be found. > LOG: Probing location 'C:\Program Files (x86)\PostSharp > 2.1\Release\mscorlib.dll' because this directory is in the search path. > LOG: The file 'C:\Program Files (x86)\PostSharp 2.1\Release\mscorlib.dll' > could not be found. > LOG: Probing location > 'C:\BrandDirector\Mobile\Brandirector.Mobile\BrandDirector.Core.Aspects\mscorlib.exe' > because this directory is in the search path. > LOG: The file > 'C:\BrandDirector\Mobile\Brandirector.Mobile\BrandDirector.Core.Aspects\mscorlib.exe' > could not be found. > LOG: Probing location > 'C:\BrandDirector\Mobile\Brandirector.Mobile\BrandDirector.Core.Aspects\mscorlib.dll' > because this directory is in the search path. > LOG: The file > 'C:\BrandDirector\Mobile\Brandirector.Mobile\BrandDirector.Core.Aspects\mscorlib.dll' > could not be found. > LOG: Probing location 'C:\Program Files (x86)\PostSharp > 2.1\PlugIns\mscorlib.exe' because this directory is in the search path. > LOG: The file 'C:\Program Files (x86)\PostSharp 2.1\PlugIns\mscorlib.exe' > could not be found. > LOG: Probing location 'C:\Program Files (x86)\PostSharp > 2.1\PlugIns\mscorlib.dll' because this directory is in the search path. > LOG: The file 'C:\Program Files (x86)\PostSharp 2.1\PlugIns\mscorlib.dll' > could not be found. > LOG: Probing location > 'C:\BrandDirector\Mobile\Brandirector.Mobile\BrandDirector.Core.Aspects\bin\Debug\mscorlib.exe' > because this directory is in the search path. > LOG: The file > 'C:\BrandDirector\Mobile\Brandirector.Mobile\BrandDirector.Core.Aspects\bin\Debug\mscorlib.exe' > could not be found. > LOG: Probing location > 'C:\BrandDirector\Mobile\Brandirector.Mobile\BrandDirector.Core.Aspects\bin\Debug\mscorlib.dll' > because this directory is in the search path. > LOG: The file > 'C:\BrandDirector\Mobile\Brandirector.Mobile\BrandDirector.Core.Aspects\bin\Debug\mscorlib.dll' > could not be found. > LOG: Probing location > 'C:\BrandDirector\Mobile\Brandirector.Mobile\BrandDirector.Core.Aspects\obj\Debug\mscorlib.exe' > because this directory is in the search path. > LOG: The file > 'C:\BrandDirector\Mobile\Brandirector.Mobile\BrandDirector.Core.Aspects\obj\Debug\mscorlib.exe' > could not be found. > LOG: Probing location > 'C:\BrandDirector\Mobile\Brandirector.Mobile\BrandDirector.Core.Aspects\obj\Debug\mscorlib.dll' > because this directory is in the search path. > LOG: The file > 'C:\BrandDirector\Mobile\Brandirector.Mobile\BrandDirector.Core.Aspects\obj\Debug\mscorlib.dll' > could not be found. > LOG: Probing location 'C:\Program Files (x86)\Reference > Assemblies\Microsoft\Framework\MonoAndroid\v2.2\mscorlib.exe' because this > directory is in the search path. > LOG: The file 'C:\Program Files (x86)\Reference > Assemblies\Microsoft\Framework\MonoAndroid\v2.2\mscorlib.exe' could not be > found. > LOG: Probing location 'C:\Program Files (x86)\Reference > Assemblies\Microsoft\Framework\MonoAndroid\v2.2\mscorlib.dll' because this > directory is in the search path. > LOG: The file 'C:\Program Files (x86)\Reference > Assemblies\Microsoft\Framework\MonoAndroid\v2.2\mscorlib.dll' could not be > found. > LOG: Probing location 'C:\Program Files (x86)\Reference > Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.exe' because this > directory is in the search path. > LOG: The file 'C:\Program Files (x86)\Reference > Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.exe' could not be > found. > LOG: Probing location 'C:\Program Files (x86)\Reference > Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll' because this > directory is in the search path. > LOG: File 'C:\Program Files (x86)\Reference > Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll' has identity > 'mscorlib, version=2.0.5.0, culture=neutral, > publickeytoken=7cec85d7bea7798e, processorarchitecture=msil'. > LOG: File 'C:\Program Files (x86)\Reference > Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll' does not > match the reference. > LOG: The assembly 'mscorlib_3' was not found. > =============================================================== > at PostSharp.Sdk.CodeModel.Domain.GetAssembly(IAssemblyName > assemblyName, BindingOptions bindingOptions) > at PostSharp.Sdk.CodeModel.AssemblyRefDeclaration.GetAssemblyEnvelope() > at > PostSharp.Sdk.Extensibility.Tasks.MulticastAttributeTask.^SgrhoGlQ(AssemblyRefDeclaration > _0) > at > PostSharp.Sdk.Extensibility.Tasks.MulticastAttributeTask.^+GwnKh4ZYHu3() > at PostSharp.Sdk.Extensibility.Tasks.MulticastAttributeTask.Execute() > at PostSharp.Sdk.Extensibility.Project.ExecutePhase(String phase) > at PostSharp.Sdk.Extensibility.Project.Execute() > at PostSharp.Hosting.PostSharpObject.ExecuteProjects() > at PostSharp.Hosting.PostSharpObject.InvokeProject(ProjectInvocation > projectInvocation) Not quite sure what this means... I will try some other things, but if this rings any bells with you guys out there, let me know. Matthew On Thu, Aug 2, 2012 at 6:30 PM, Matthew Leibowitz <[email protected]>wrote: > Hi all, > > Has anyone tried using postsharp 2.1 with mono for android? > > One guy managed to get it to work, but he was using version 2. Version 2.1 > seems to use the mscorlib 5? Maybe its because of silverlight 5 being > installed? > > I'll see if I can give some more info when I get home, but I just wanted > to see if anyone tried something? > > Matthew > > Sent from my Android. >
_______________________________________________ Monodroid mailing list [email protected] UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
