|
|
|
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.
|
|
|
|
|
Gael Fraiteur
SharpCrafters
|
|
|
Right, Compact Framework .NET 3.5 is not supported in PostSharp 1.5. It will be supported in PostSharp 2.0.
|
|
|
|
|
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
|
|
|
|
|
Gael Fraiteur
SharpCrafters
|
|
Hi Miquel,
Silverlight and Compact Framework are not yet supported in this CTP.
-gael
|
|
|
|
|
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
|
|
|
|
|
Gael Fraiteur
SharpCrafters
|
|
No, there's no progress on this front .
|
|
|
|