Can't build .NET Standard 2.0 projects on Win 10 Fall Creators Update/with .NET Framework 4.7.1 installed

avatar's Avatar

avatar

01 Nov, 2017 03:43 PM

Error message as follows, and simple reproduction project attached:

    Error PS0099: Unhandled exception (postsharp-net40-x86-srv.exe release | .NET Framework 4.7.1): PostSharp.Sdk.CodeModel.BindingException: Error while loading the type "_471Build.Class1, 471Build, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null": System.IO.FileLoadException: Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. Assembly in host store has a different signature than assembly in GAC. (Exception from HRESULT: 0x80131050)
File name: 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
   at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type)
   at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
   at System.Reflection.Assembly.GetType(String name, Boolean throwOnError)
   at PostSharp.Sdk.CodeModel.AssemblyLoadHelper.^jJBt(Assembly _0, String _1, Boolean _2, Boolean _3)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

===== Start of PostSharp Assembly Binder ===========================
Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. Assembly in host store has a different signature than assembly in GAC. (Exception from HRESULT: 0x80131050)
======Exception Details ============================================
LOG: Loading type _471Build.Class1 from assembly 471Build, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
LOG:    (ClrHost) ProvideAssembly: "netstandard, version=2.0.0.0, culture=neutral, publickeytoken=cc7b13ffcd2ddd51, processorarchitecture=x86".
LOG:    Finding runtime assembly with binding identity 'netstandard, version=2.0.0.0, culture=neutral, publickeytoken=cc7b13ffcd2ddd51, processorarchitecture=x86' in the Runtime context.
LOG:        Post-policy assembly binding identity is: netstandard, version=2.0.0.0, culture=neutral, publickeytoken=cc7b13ffcd2ddd51, processorarchitecture=x86.
LOG:        Found file 'C:\ProgramData\PostSharp\FacadeAssemblies\v7\.NETStandard,Version=v2.0\.NETFramework,Version=v4.7.1\netstandard__30f3463249726359f860eff354e27fd1.dll', identity='netstandard, version=2.0.0.0, culture=neutral, publickeytoken=cc7b13ffcd2ddd51, processorarchitecture=msil', ProcessorArchitecture=MSIL.
LOG:        Reference mismatch for 'C:\ProgramData\PostSharp\FacadeAssemblies\v7\.NETStandard,Version=v2.0\.NETFramework,Version=v4.7.1\netstandard__30f3463249726359f860eff354e27fd1.dll' [ProcessorArchitectureMismatch].
LOG:        Looking in GAC for netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=x86.
LOG:        Found file 'C:\Users\avatar\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\netstandard.dll', identity='netstandard, version=2.0.0.0, culture=neutral, publickeytoken=cc7b13ffcd2ddd51', ProcessorArchitecture=NoPlatform.
LOG:        Reference mismatch for 'C:\Users\avatar\.nuget\packages\netstandard.library\2.0.0\build\netstandard2.0\ref\netstandard.dll' [ProcessorArchitectureMismatch].
LOG:        The assembly 'netstandard, version=2.0.0.0, culture=neutral, publickeytoken=cc7b13ffcd2ddd51, processorarchitecture=x86' was not found.
LOG:    (ClrHost) ProvideAssembly: "netstandard, version=2.0.0.0, culture=neutral, publickeytoken=cc7b13ffcd2ddd51, processorarchitecture=x86": file not found!
LOG:    (ClrHost) ProvideAssembly: "netstandard, version=2.0.0.0, culture=neutral, publickeytoken=cc7b13ffcd2ddd51, processorarchitecture=msil".
LOG:    Finding runtime assembly with binding identity 'netstandard, version=2.0.0.0, culture=neutral, publickeytoken=cc7b13ffcd2ddd51, processorarchitecture=msil' in the Runtime context.
LOG:        Post-policy assembly binding identity is: netstandard, version=2.0.0.0, culture=neutral, publickeytoken=cc7b13ffcd2ddd51, processorarchitecture=msil.
LOG:        Found file 'C:\ProgramData\PostSharp\FacadeAssemblies\v7\.NETStandard,Version=v2.0\.NETFramework,Version=v4.7.1\netstandard__30f3463249726359f860eff354e27fd1.dll', identity='netstandard, version=2.0.0.0, culture=neutral, publickeytoken=cc7b13ffcd2ddd51, processorarchitecture=msil', ProcessorArchitecture=MSIL.
LOG:        Location found in facade assemblies: 'C:\ProgramData\PostSharp\FacadeAssemblies\v7\.NETStandard,Version=v2.0\.NETFramework,Version=v4.7.1\netstandard__30f3463249726359f860eff354e27fd1.dll'.
LOG:        Selecting file 'C:\ProgramData\PostSharp\FacadeAssemblies\v7\.NETStandard,Version=v2.0\.NETFramework,Version=v4.7.1\netstandard__30f3463249726359f860eff354e27fd1.dll' with identity 'netstandard, version=2.0.0.0, culture=neutral, publickeytoken=cc7b13ffcd2ddd51, processorarchitecture=msil'.
LOG:    (ClrHost) ProvideAssembly: "netstandard, version=2.0.0.0, culture=neutral, publickeytoken=cc7b13ffcd2ddd51, processorarchitecture=msil": located in "C:\ProgramData\PostSharp\FacadeAssemblies\v7\.NETStandard,Version=v2.0\.NETFramework,Version=v4.7.1\netstandard__30f3463249726359f860eff354e27fd1.dll".
LOG:    (ClrHost) ProvideAssembly: "netstandard, version=2.0.0.0, culture=neutral, publickeytoken=cc7b13ffcd2ddd51, processorarchitecture=msil": returned successfully.
LOG:    AssemblyLoadException: Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. Assembly in host store has a different signature than assembly in GAC. (Exception from HRESULT: 0x80131050)

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

    
   at PostSharp.Sdk.CodeModel.AssemblyLoadHelper.^jJBt(Assembly _0, String _1, Boolean _2, Boolean _3)
   at ^XJbqCOExOmCj.^NRQTI+sj(INamedType _0, BindingOptions _1)
   at PostSharp.Sdk.CodeModel.TypeDefDeclaration.^VorA+nDk(BindingOptions _0)
   at ^Mzw3\.bgGgRlJ.^cCM832sT[??0](Object _0, BindingOptions _1, ^d1u4kZd5aJLe _2)
   at PostSharp.Sdk.CodeModel.TypeDefDeclaration.GetSystemType(Type[] genericTypeArguments, Type[] genericMethodArguments, BindingOptions options)
   at PostSharp.Sdk.CodeModel.TypeDefDeclaration.^xHA5o+hH(Type[] _0, Type[] _1, BindingOptions _2)
   at ^jqeKuXFvja9f.^LPrXINXM(IAnnotationInstance _0)
   at ^jqeKuXFvja9f.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). (1, 1)

Thoughts?

Alistair

  1. Support Staff 1 Posted by PostSharp Techn... on 02 Nov, 2017 03:31 PM

    PostSharp Technologies's Avatar

    Hello,

    This is a bug. You can work around this by deleting file %ProgramData%PostSharp\FacadeAssemblies\v7\.NETCoreApp,Version=v2.0\.NETFramework,Version=v4.7.1\netstandard__8e6abb73ebaa695fccea23284f74dc70.dll

    We're closing the ticket for now as the bug has been internally filed as issue #15607. We will contact you as soon as the bug fix has been released.

    For more details on our support policies and prioritization of bug fixes, please visit https://www.postsharp.net/support/policies.

    Best regards,
    -tony

  2. PostSharp Technologies closed this discussion on 02 Nov, 2017 03:31 PM.

  3. PostSharp Technologies re-opened this discussion on 20 Nov, 2017 09:52 AM

  4. Support Staff 2 Posted by PostSharp Techn... on 20 Nov, 2017 09:52 AM

    PostSharp Technologies's Avatar

    Hello,

    The bug #15607 has been fixed in the current version of PostSharp 5.0.38.
    Should you need further help with this issue, don't hesitate to re-open this discussion.

    -alex

  5. PostSharp Technologies closed this discussion on 20 Nov, 2017 09:52 AM.

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