Yep, perhaps if enough people requested PS support for M4A we could change 
Gael's mind.

Miha

From: [email protected] 
[mailto:[email protected]] On Behalf Of Matthew Leibowitz
Sent: Friday, August 24, 2012 9:18 AM
To: Discussions related to Mono for Android; [email protected]
Subject: Re: [mono-android] PostSharp 2.1 and Mono for Android

Hi all,

Just some new from the PostSharp guys:
Mono is only unofficially supported (you'll see in the support agreement that 
it is not supported). From the next version of PostSharp, we will completely 
stop testing our product with Mono (Mono testing currently is very weak 
anyway), so the support will even be worse.
http://support.sharpcrafters.com/discussions/questions/34-unofficial-mono-for-android-monotouch-support

Bad news for the MonoTouch guys who have to use the Mono compiler.

But, this looks good (you still need the Microsoft.NET):
Portable class libraries are not supported in PostsSharp 2.1. It will be 
supported in PostSharp 3.0.
http://support.sharpcrafters.com/discussions/problems/258-portable-class-libraries-support

I put in a feature request for MonoTouch/Mono for Android here:
http://support.sharpcrafters.com/discussions/suggestions/7-mono-for-android-monotouch-support

So, if you feel that you could use PostSharp in your apps, then just leave some 
incentive for Gael. Remember that there is a free full version for OpenSource 
projects and Students as well as a free Starter Edition:
http://www.sharpcrafters.com/purchase/discounts

So, let's stand together and fill that request with replies and keep support 
for Mono.

My use case is with the MvvmCross framework. It is so good that all code 
virtually goes into a Totally 100% cross-platformable ViewModel, and I just use 
the different Views and Bindings. But we have to implement the 
INotifyPropertyChanged and the horrible RaiseEvent for each property. I have a 
POC that works brilliantly with PostSharp, so there is very little non-bussines 
logic in the VM.


Matthew Leibowitz


On Fri, Aug 3, 2012 at 10:44 AM, Sayed Arian Kooshesh 
<[email protected]<mailto:[email protected]>> wrote:
which mean (guessing) you are targeting v3? Perhaps you changed it 4?

On Fri, Aug 3, 2012 at 3:43 AM, Sayed Arian Kooshesh 
<[email protected]<mailto:[email protected]>> wrote:
Look like, from the log, it was looking for 'mscorlib_3' and couldn't find 
(till now)
On Fri, Aug 3, 2012 at 3:04 AM, Matthew Leibowitz 
<[email protected]<mailto:[email protected]>> wrote:
Well, some weird news, all is now working. I did nothing except:

I first tried updating PostSharp to version 2.1.7.6. This made no changes.
Then, I created the sample in VS 2012:  
http://www.sharpcrafters.com/postsharp/documentation#getting-started. No work...
In utter desperation I created the same project in VS 2012. It worked. Hmm.
So I tried the VS 2012 project again. Still no go.
Then, the brainwave. The VS 2010 project works, so lets open that in VS 2012. 
That worked. The only difference was the project files and the VS version.
I assumed that as the same project file (the one from VS 2010) worked in both 
VS versions, then it must be the project file. Wrong! Both the code and the 
project file were exactly the same. The only difference was the project GUID - 
one line.

Now here comes the crazy part (before I broke down in tears):
I opened the original project (the one with the errors). It now builds fine :)

Don't ask me what happened. I haven't touched that project since yesterday. 
Maybe it was the upgrade slowly kicking in or maybe it was the first build with 
VS 2010. Or maybe it was the incessant building and re-building. (Or the hand 
waving).

Note: you do need the PostSharp.Custom.targets file.

So the sum of the story is: It works. Who knows why.

Hope this helps :)

Matthew


On Fri, Aug 3, 2012 at 8:46 AM, Matthew Leibowitz 
<[email protected]<mailto:[email protected]>> wrote:
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]<mailto:[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]<mailto:[email protected]>

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



--
Extreme Knowledge is not something for which he programs a computer but for 
which his computer is programming him.

-Wozniak



--
Extreme Knowledge is not something for which he programs a computer but for 
which his computer is programming him.

-Wozniak

_______________________________________________
Monodroid mailing list
[email protected]<mailto:[email protected]>

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

_______________________________________________
Monodroid mailing list
[email protected]

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

Reply via email to