PostSharp.Sdk.CodeModel.AssemblyLoadException

scdamion's Avatar

scdamion

25 Sep, 2017 09:16 PM

my current configuration is:
Visual Studio 2017
Xamarin 4.6.3.4
Xamarin Android SDK 7.4.3.1
Xamarin.IOS 10.12.3.3

Verion of PostSharp installed on xamarin.Android and Xamarin.IOS is 4.3.20

I'm unable to build the solution after installeding PostSharp version 4.3.20.0. I have tried many solutions posted online with no luck. The build error is blow:

Severity Code Description Project File Line Suppression State
Error Unhandled exception (4.3.20.0, postsharp-net40-x86-srv.exe, CLR 4.0.30319.460798, Release): PostSharp.Sdk.CodeModel.AssemblyLoadException: Cannot find assembly 'system.collections, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a'. [Version mismatch]
============ PostSharp Assembly Loading Log ===================
LOG: Finding the assembly with binding identity 'system.collections, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a'.
LOG: Probing location 'C:\ProgramData\PostSharp\4.3.20\bin.Release\System.Collections.exe' because this directory was explicitly added to the search path [File Not Found].
LOG: Probing location 'C:\ProgramData\PostSharp\4.3.20\bin.Release\System.Collections.dll' because this directory was explicitly added to the search path [File Not Found].
LOG: Probing location 'C:\ProgramData\PostSharp\4.3.20\bin.Release\System.Collections.winmd' because this directory was explicitly added to the search path [File Not Found].
...
...
LOG: The assembly 'system.collections, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a' was not found.
===============================================================
   at PostSharp.Sdk.CodeModel.Domain.GetAssembly(IAssemblyName assemblyName, BindingOptions bindingOptions, AssemblyLoadContext context)
   at PostSharp.Sdk.CodeModel.AssemblyRefDeclaration.GetAssemblyEnvelope(BindingOptions bindingOptions)
   at PostSharp.Sdk.CodeModel.TypeRefDeclaration.GetTypeDefinition(BindingOptions bindingOptions)
   at PostSharp.Sdk.CodeModel.TypeRefDeclaration.GetTypeDefinition()
   at PostSharp.Sdk.CodeModel.CompareExtensions.^G+gKPm9V(INamedType _0, INamedType _1, BindingOptions _2)
   at PostSharp.Sdk.CodeModel.CompareExtensions.DefinitionMatchesReference(INamedType definition, INamedType reference, BindingOptions options)
   at PostSharp.Sdk.CodeModel.TypeRefDeclaration.^A9yFoe2uB3TC(ITypeSignature _0, BindingOptions _1)
   at PostSharp.Sdk.CodeModel.TypeSignatures.GenericTypeInstanceTypeSignature.^0QddF7K+(ITypeSignature _0, BindingOptions _1)
   at PostSharp.Sdk.CodeModel.TypeSignature.^A9yFoe2uB3TC(ITypeSignature _0, BindingOptions _1)
   at PostSharp.Sdk.CodeModel.CompareExtensions.DefinitionMatchesReference(IMethodSignature definition, IMethodSignature reference, BindingOptions options)
   at PostSharp.Sdk.CodeModel.MethodDefDeclaration.MatchesReference(IMethodSignature reference)
   at ^XJbqCOExOmCj.^ntUh+kIs(GenericMap _0, IMethodSignature _1, IEnumerable _2)
   at PostSharp.Sdk.CodeModel.Collections.MethodDefDeclarationCollection.GetMethod(String name, IMethodSignature signature, BindingOptions bindingOptions)
   at PostSharp.Sdk.CodeModel.MethodRefDeclaration.GetMethodDefinition(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). Valiant.Applications.Mobile.Android C:\SVN\D\WebApps\API\Valiant.Applications.Mobile\Valiant.Applications.Mobile.Android\POSTSHARP

  1. Support Staff 1 Posted by PostSharp Techn... on 28 Sep, 2017 09:42 PM

    PostSharp Technologies's Avatar

    Hello,

    I'm sorry about the delay. I was not able to reproduce the issue. Could you please try upgrading to the latest version of PostSharp 4.3. If the problem persists, could you please send us a reproduction?

    Thanks!

    Best regards,
    Daniel

  2. Support Staff 2 Posted by PostSharp Techn... on 09 Oct, 2017 12:08 PM

    PostSharp Technologies's Avatar

    Hello,

    We are going to close this request as there have not been any further updates. Please feel free to reopen the discussion if you need more help.

    Thanks,
    PostSharp Team

  3. PostSharp Technologies closed this discussion on 09 Oct, 2017 12:08 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac