SharpCrafters Forum – .NET 3.5 Compact Framework Support

SharpCrafters Support Forum

        


.NET 3.5 Compact Framework Support Expand / Collapse
Author
Message
Posted 9/15/2009 6:56:39 AM


Community Member
Hi. I'm trying to use PostSharp with Compact Framework .NET 3.5 but I think it isn't supported. I'm getting this error when trying to compile my solution.

Error 1 Unhandled exception: PostSharp.CodeModel.BindingException: Error while loading the assembly "mscorlib": Assembly not found.
===== PostSharp Assembly Binder =================
Resolving the assembly name 'mscorlib'.
Looking in GAC for mscorlib, Version=3.5.0.0, Culture=neutral, PublicKeyToken=969db8053d3322ac.
Looking in GAC for mscorlib, Version=3.5.0.0, Culture=neutral, PublicKeyToken=969db8053d3322ac, processorArchitecture=x86.
Looking in GAC for mscorlib, Version=3.5.0.0, Culture=neutral, PublicKeyToken=969db8053d3322ac, processorArchitecture=MSIL.
Probing location 'C:\Program Files\PostSharp 1.5\mscorlib.exe' because this directory contains an assembly that has already been loaded.
Probing location 'C:\Program Files\PostSharp 1.5\mscorlib.dll' because this directory contains an assembly that has already been loaded.
Probing location 'C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\mscorlib.dll' because this file was explicitely added to the search path.
File 'C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\mscorlib.dll' has identity 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=969db8053d3322ac'.
File 'C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\mscorlib.dll' does not match the reference.
Probing location 'C:\Program Files\PostSharp 1.5\mscorlib.exe' because because this directory is in the search path.
Probing location 'C:\Program Files\PostSharp 1.5\mscorlib.dll' because because this directory is in the search path.
Probing location 'C:\Program Files\PostSharp 1.5\PlugIns\mscorlib.exe' because because this directory is in the search path.
Probing location 'C:\Program Files\PostSharp 1.5\PlugIns\mscorlib.dll' because because this directory is in the search path.
Probing location 'D:\Projects\DemoDevice\DemoDevice\bin\Debug\mscorlib.exe' because because this directory is in the search path.
Probing location 'D:\Projects\DemoDevice\DemoDevice\bin\Debug\mscorlib.dll' because because this directory is in the search path.
File 'D:\Projects\DemoDevice\DemoDevice\bin\Debug\mscorlib.dll' has identity 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=969db8053d3322ac'.
File 'D:\Projects\DemoDevice\DemoDevice\bin\Debug\mscorlib.dll' does not match the reference.
Probing location 'D:\Projects\DemoDevice\DemoDevice\obj\Debug\mscorlib.exe' because because this directory is in the search path.
Probing location 'D:\Projects\DemoDevice\DemoDevice\obj\Debug\mscorlib.dll' because because this directory is in the search path.
The assembly "mscorlib, Version=3.5.0.0, Culture=neutral, PublicKeyToken=969db8053d3322ac" was not found.

=================================================

   
  at PostSharp.CodeModel.Domain.GetAssembly(IAssemblyName assemblyName, BindingOptions bindingOptions)
  at PostSharp.CodeModel.AssemblyRefDeclaration.GetAssemblyEnvelope()
  at PostSharp.CodeModel.TypeRefDeclaration.GetTypeDefinition(BindingOptions bindingOptions)
  at PostSharp.CodeModel.TypeRefDeclaration.GetTypeDefinition()
  at PostSharp.Extensibility.Tasks.TypeHierarchyTask.IndexType(TypeDefDeclaration type)
  at PostSharp.Extensibility.Tasks.AnnotationRepositoryTask.InternalAddAnnotation(IAnnotationInstance attribute)
  at PostSharp.Extensibility.Tasks.AnnotationRepositoryTask.Execute()
  at PostSharp.Extensibility.Project.ExecutePhase(String phase)
  at PostSharp.Extensibility.Project.Execute()
  at PostSharp.Extensibility.PostSharpObject.ExecuteProjects()
  at PostSharp.Extensibility.PostSharpObject.InvokeProject(ProjectInvocation projectInvocation)
  at PostSharp.MSBuild.PostSharpRemoteTask.Execute(PostSharpTaskParameters parameters, TaskLoggingHelper log) DemoDevice

The same code works just fine if I target against .NET 2.0. I've checked the reference to mscorlib for both projects( .NET 3.5 & .NET 2.0 ).
.NET 2.0 Version uses - "C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\mscorlib.dll".
.NET 3.5 Version uses - "C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll" (Yes it seems like it uses the standard version of .NET mscorlib.dll not the comapact version.)
I don't know what's the problem nor how to fix it.
Please help me.
Post #2421
Posted 9/18/2009 6:54:22 AM


Gael Fraiteur

SharpCrafters
Right, Compact Framework .NET 3.5 is not supported in PostSharp 1.5. It will be supported in PostSharp 2.0.
Post #2422
Posted 3/2/2010 7:46:52 AM


Community Member
Hi Gael,

I downloaded the 2.0 CTP3 trial version and I have the same error message.
Can you help me?

Miquel Canfran
Post #4056
Posted 3/2/2010 7:53:19 AM


Gael Fraiteur

SharpCrafters
Hi Miquel,

Silverlight and Compact Framework are not yet supported in this CTP.

-gael
Post #4057
Posted 3/8/2010 11:40:07 PM


Community Member
Hi Gael,

I need to intecept method calls in compact framework 3.5. Do you know if actually exists any library or framework class that I can use?

Thanks for your time.

Miquel Canfran
Post #4106
Posted 3/9/2010 7:19:25 AM


Gael Fraiteur

SharpCrafters
No, there's no progress on this front .
Post #4110
« Prev Topic | Next Topic »


All times are GMT +1:00, Time now is 11:45am

Powered By InstantForum.NET v4.1.4 © 2010
Execution: 0.151. 7 queries. Compression Disabled.