6.0.12-rc build error

mope's Avatar

mope

11 Jun, 2018 01:37 PM

In a solution targeting .NET 4.7.2 for the executable and having a netstandard2.0 class library where the class library includes a package which gives a NuGet warning, the following build error occurs:

Package 'ZendeskApi_v2 3.7.1' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.

error PS0264: Could not load file or assembly 'ZendeskApi_v2, Version=3.7.1.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified. Build your project with detailed verbosity to see the assembly loading log.
verbose PS0265: Detailed log for the previous error:
verbose PS0265: LOG: Loading type XXX.YYY.Shared.Zendesk.ZendeskApiWrapper from assembly XXX.YYY, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
verbose PS0265: LOG: Type loaded successfully.
verbose PS0265: LOG: OnAssemblyResolve: ZendeskApi_v2, Version=3.7.1.0, Culture=neutral, PublicKeyToken=null
verbose PS0265: LOG: AssemblyFileLoadingService.LoadAssemblyFromName( "zendeskapi_v2, version=3.7.1.0, culture=neutral, publickeytoken=null" ).
verbose PS0265: LOG: ^bZYM7r84jS8y: Mapping assembly name zendeskapi_v2, version=3.7.1.0, culture=neutral, publickeytoken=null
verbose PS0265: LOG: No policy found.
verbose PS0265: LOG: Assembly 'zendeskapi_v2, version=3.7.1.0, culture=neutral, publickeytoken=null' is not yet loaded in the AppDomain.
verbose PS0265: LOG: Finding runtime assembly with binding identity 'zendeskapi_v2, version=3.7.1.0, culture=neutral, publickeytoken=null'.
verbose PS0265: LOG: PostSharp.Sdk.AssertionFailedException: Ambiguity: more than one reference assembly possible to generate the facade for 'zendeskapi_v2, version=3.7.1.0, culture=neutral, publickeytoken=null': {PackageProjectReference Reference="zendeskapi_v2, version=0.0.0.0, culture=neutral, publickeytoken=null, TargetFramework={.NETFramework,Version=v4.5}, Path={C:\Users\ZZZ.nuget\packages\zendeskapi_v2\3.7.1\lib\net45\ZendeskApi_v2.dll}", Runtime=""}, {PackageProjectReference Reference="zendeskapi_v2, version=0.0.0.0, culture=neutral, publickeytoken=null, TargetFramework={.NETFramework,Version=v3.5}, Path={C:\Users\ZZZ.nuget\packages\zendeskapi_v2\3.7.1\lib\net35\ZendeskApi_v2.dll}", Runtime=""}, {PackageProjectReference Reference="zendeskapi_v2, version=0.0.0.0, culture=neutral, publickeytoken=null, TargetFramework={.NETFramework,Version=v4.0}, Path={C:\Users\ZZZ.nuget\packages\zendeskapi_v2\3.7.1\lib\net40\ZendeskApi_v2.dll}", Runtime=""}, {PackageProjectReference Reference="zendeskapi_v2, version=0.0.0.0, culture=neutral, publickeytoken=null, TargetFramework={.NETFramework,Version=v4.5}, Path={C:\Users\ZZZ.nuget\packages\zendeskapi_v2\3.7.1\lib\net45\ZendeskApi_v2.dll}", Runtime=""}, {PackageProjectReference Reference="zendeskapi_v2, version=0.0.0.0, culture=neutral, publickeytoken=null, TargetFramework={.NETPortable,Version=v4.0,Profile=Profile328}, Path={C:\Users\ZZZ.nuget\packages\zendeskapi_v2\3.7.1\lib\portable40-net40+sl5+win8+wp8+wpa81\ZendeskApi_v2.dll}", Runtime=""}.
verbose PS0265: at PostSharp.Sdk.CodeModel.Binding.RuntimeAssemblyLocator.FindAssemblyCore(IAssemblyName _0, IAssemblyIdentity& _1) in D:\src\PostSharp-5\Core\PostSharp.Sdk\Sdk\CodeModel\Binding\RuntimeAssemblyLocator.cs:line 170
verbose PS0265: at PostSharp.Sdk.CodeModel.Binding.AssemblyLocator.FindAssembly(IAssemblyName _0) in D:\src\PostSharp-5\Core\PostSharp.Sdk\Sdk\CodeModel\Binding\AssemblyLocator.cs:line 178
verbose PS0265: at PostSharp.Platform.Neutral.AssemblyFileLoadingService.LoadAssemblyFromName(IAssemblyName _0) in D:\src\PostSharp-5\Core\PostSharp.Sdk\Platform\Neutral\AssemblyFileLoadingService.cs:line 110
verbose PS0265: at PostSharp.Platform.Neutral.AssemblyFileLoadingService.OnAssemblyResolve(String _0) in D:\src\PostSharp-5\Core\PostSharp.Sdk\Platform\Neutral\AssemblyFileLoadingService.cs:line 71
verbose PS0265: LOG: OnAssemblyResolve: ZendeskApi_v2, Version=3.7.1.0, Culture=neutral, PublicKeyToken=null
verbose PS0265: LOG: AssemblyFileLoadingService.LoadAssemblyFromName( "zendeskapi_v2, version=3.7.1.0, culture=neutral, publickeytoken=null" ).
verbose PS0265: LOG: Assembly 'zendeskapi_v2, version=3.7.1.0, culture=neutral, publickeytoken=null' is not yet loaded in the AppDomain.
verbose PS0265: LOG: Finding runtime assembly with binding identity 'zendeskapi_v2, version=3.7.1.0, culture=neutral, publickeytoken=null'.
verbose PS0265: LOG: PostSharp.Sdk.AssertionFailedException: Ambiguity: more than one reference assembly possible to generate the facade for 'zendeskapi_v2, version=3.7.1.0, culture=neutral, publickeytoken=null': {PackageProjectReference Reference="zendeskapi_v2, version=0.0.0.0, culture=neutral, publickeytoken=null, TargetFramework={.NETFramework,Version=v4.5}, Path={C:\Users\ZZZ.nuget\packages\zendeskapi_v2\3.7.1\lib\net45\ZendeskApi_v2.dll}", Runtime=""}, {PackageProjectReference Reference="zendeskapi_v2, version=0.0.0.0, culture=neutral, publickeytoken=null, TargetFramework={.NETFramework,Version=v3.5}, Path={C:\Users\ZZZ.nuget\packages\zendeskapi_v2\3.7.1\lib\net35\ZendeskApi_v2.dll}", Runtime=""}, {PackageProjectReference Reference="zendeskapi_v2, version=0.0.0.0, culture=neutral, publickeytoken=null, TargetFramework={.NETFramework,Version=v4.0}, Path={C:\Users\ZZZ.nuget\packages\zendeskapi_v2\3.7.1\lib\net40\ZendeskApi_v2.dll}", Runtime=""}, {PackageProjectReference Reference="zendeskapi_v2, version=0.0.0.0, culture=neutral, publickeytoken=null, TargetFramework={.NETFramework,Version=v4.5}, Path={C:\Users\ZZZ.nuget\packages\zendeskapi_v2\3.7.1\lib\net45\ZendeskApi_v2.dll}", Runtime=""}, {PackageProjectReference Reference="zendeskapi_v2, version=0.0.0.0, culture=neutral, publickeytoken=null, TargetFramework={.NETPortable,Version=v4.0,Profile=Profile328}, Path={C:\Users\ZZZ.nuget\packages\zendeskapi_v2\3.7.1\lib\portable40-net40+sl5+win8+wp8+wpa81\ZendeskApi_v2.dll}", Runtime=""}.
verbose PS0265: at PostSharp.Sdk.CodeModel.Binding.RuntimeAssemblyLocator.FindAssemblyCore(IAssemblyName _0, IAssemblyIdentity& _1) in D:\src\PostSharp-5\Core\PostSharp.Sdk\Sdk\CodeModel\Binding\RuntimeAssemblyLocator.cs:line 170
verbose PS0265: at PostSharp.Sdk.CodeModel.Binding.AssemblyLocator.FindAssembly(IAssemblyName _0) in D:\src\PostSharp-5\Core\PostSharp.Sdk\Sdk\CodeModel\Binding\AssemblyLocator.cs:line 178
verbose PS0265: at PostSharp.Platform.Neutral.AssemblyFileLoadingService.LoadAssemblyFromName(IAssemblyName _0) in D:\src\PostSharp-5\Core\PostSharp.Sdk\Platform\Neutral\AssemblyFileLoadingService.cs:line 110
verbose PS0265: at PostSharp.Platform.Neutral.AssemblyFileLoadingService.OnAssemblyResolve(String _0) in D:\src\PostSharp-5\Core\PostSharp.Sdk\Platform\Neutral\AssemblyFileLoadingService.cs:line 71
verbose PS0265: .
info : PostSharp 6.0.12 [PostSharp.Compiler.Hosting.CommandLine.dll 6.0.12 release | .NET Core 2.0.7] complete -- 1 errors, 0 warnings, processed in 2909 ms

  1. Support Staff 1 Posted by PostSharp Techn... on 11 Jun, 2018 02:24 PM

    PostSharp Technologies's Avatar

    Hello,

    thanks for reporting the issue. I was able to reproduce the issue. The problem is that the package does not support .NET Standard itself and PostSharp is unable to load the assembly properly. We will be analyzing this problem more deeply.

    (internal issue #16161)

    Best regards,
    Daniel

  2. Support Staff 2 Posted by PostSharp Techn... on 15 Jun, 2018 01:28 PM

    PostSharp Technologies's Avatar

    Hello,

    we have release a fix for this issue in PostSharp 6.0.13-rc.

    Best regards,
    Daniel

  3. Support Staff 3 Posted by PostSharp Techn... on 15 Jun, 2018 01:28 PM

    PostSharp Technologies's Avatar

    Hello,

    We are going to close this request as we believe it was solved. Please feel free to reopen the discussion if you need more help.

    Best regards,
    Daniel

  4. PostSharp Technologies closed this discussion on 15 Jun, 2018 01:28 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