Skip to content

Package with lib/net35-client and lib/portable-net4+sl5+netcore45+wpa81+wp8 installs wrong version for project targeting 4.5 #559

Closed

Description

@agross

(The package is PostSharp 4.0.39)

NuGet installs lib/net35-client to a 4.5 class library, whereas paket installs lib/portable-net4+sl5+netcore45+wpa81+wp8. When you try to load the PostSharp-processed assembly it will cause exceptions when instantiating types:

System.TypeInitializationException: The type initializer for 'PostSharp.ImplementationDetails_688d9669.<>z__a_4' threw an exception. ---> System.TypeInitializationException: The type initializer for 'PostSharp.ImplementationDetails_688d9669.<>z__a_14' threw an exception. ---> System.TypeLoadException: Could not load type 'PostSharp.Aspects.Serialization.BinaryAspectSerializer' from assembly 'PostSharp, Version=4.0.39.0, Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7'.

This is because BinaryAspectSerializer is only defined in the lib/net35-client assembly.

Activity

  1. agross commented on Jan 19, 2015

    @agross
    ContributorAuthor

    Seems like paket doesn't even add a <When Condition=""/> for net35-client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions