Skip to content

References are broken (sometimes) in universal app class libraries (Windows 8.1 + Windows Phone 8.1) #281

Closed

Description

@christianlang

Please see the project "UniversalClassLibrary" in https://github.com/christianlang/PaketTestProjects.

The package "reactive-core" referenced indirectly (through "reactiveui") in paket.references doesn't show up correctly in the project references. The package "Splat" (also referenced indirectly through "reactiveui") does. Both are from the same author and have a quite similar list of target frameworks they support.

I think it might be because there's a check for $(TargetPlatformVersion) == '7.0'" in the csproj file and the class library has a newer value. For Splat paket generates an "Otherwise" case instead which probably is the reason why it works.

image

Activity

  1. forki commented on Oct 21, 2014

    @forki
    Member

    yes the targetplatformversion was a guess by me and @agross
    can you manually try fix it somehow?

    what should we emit? Or should just get rid of the targetplatform?

  2. christianlang commented on Oct 21, 2014

    @christianlang
    ContributorAuthor

    Okay, the TargetPlatformVersion is not the problem. Version 7.0 is right - which is strange because I'd expect it to be 4.6 because of the reference assembly path for the profile 32 is
    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETPortable\v4.6\Profile\Profile32

    Anyway, the problem is the TargetFrameworkProfile. msbuild tells me it's "Profile32", not "win81+wpa81" for this project. So when I change this check, it works:
    $(TargetFrameworkProfile) == 'Profile32'

  3. forki commented on Oct 21, 2014

    @forki
    Member

    please try 0.9.0-alpha002

  4. forki commented on Oct 21, 2014

    @forki
    Member

    do you know what net45-win8-wp8-wpa81 is? that's the other one in your sample. seems it's not listed in our inofficial list.

  5. christianlang commented on Oct 21, 2014

    @christianlang
    ContributorAuthor

    That's profile 259.

    And yes, the new version fixes the problem in my specific case. But I see another, more general problem with PCLs: Paket checks for specific profiles, which is too restrictive. If I have a portable class library for win81 and wpa81, but the package only supports "net45+win8+wp8+wpa81", this is still fine. Because this package target supports a superset of what I need. I'm afraid the whole logic for PCLs needs to be way more complicated :(

    I guess we need a compatibility tree with all profiles which tells us which profile is ok to include from which other profile. Then, of course, the references have to be prioritized correctly. If the package directly supports my profile, it's better to take this build than another one which supports more targets.

  6. christianlang commented on Oct 21, 2014

    @christianlang
    ContributorAuthor

    Maybe there's a simpler solution than the compatibility tree. We need to have a mapping between profile numbers and the supported platforms (I think you have that already). Then when a package has a build for net45-win8-wp8-wpa81 we can use it for every profile which targets a subset of these 4 platforms. So we construct all possible subsets, get the matching profile number and include that in the csproj file.

  7. forki commented on Oct 21, 2014

    @forki
    Member

    at the moment we do:

    flicken

    your solution sound like a real step forward.

  8. christianlang commented on Oct 21, 2014

    @christianlang
    ContributorAuthor

    hehe, perfect picture :)

  9. forki commented on Oct 21, 2014

    @forki
    Member

    if you are interested and have the time I'd love to see 2-3 examples of your idea. Then I could write test cases and try to implement it.

  10. christianlang commented on Oct 22, 2014

    @christianlang
    ContributorAuthor

    Sure. I'll get back to you later. I thought a lot about this since yesterday but I need to write it down and maybe implement something to see if it actually works.

  11. forki commented on Oct 22, 2014

    @forki
    Member

    catchingfire

    catching fire? Nice.

  12. christianlang commented on Nov 21, 2014

    @christianlang
    ContributorAuthor

    @forki It's been a while, but here's what I came up with in the meantime: #380.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions