Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
christianlang opened this issue Oct 21, 2014 · 12 comments
Labels

Comments

@christianlang
Copy link
Contributor

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

@forki
Copy link
Member

forki commented Oct 21, 2014

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?

@forki forki added the bug label Oct 21, 2014
@christianlang
Copy link
Contributor Author

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'

@forki forki closed this as completed in e807119 Oct 21, 2014
@forki
Copy link
Member

forki commented Oct 21, 2014

please try 0.9.0-alpha002

@forki
Copy link
Member

forki commented Oct 21, 2014

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.

@christianlang
Copy link
Contributor Author

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.

@christianlang
Copy link
Contributor Author

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.

@forki
Copy link
Member

forki commented Oct 21, 2014

at the moment we do:

flicken

your solution sound like a real step forward.

@christianlang
Copy link
Contributor Author

hehe, perfect picture :)

@forki
Copy link
Member

forki commented Oct 21, 2014

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.

@christianlang
Copy link
Contributor Author

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.

@forki
Copy link
Member

forki commented Oct 22, 2014

catchingfire

catching fire? Nice.

@christianlang
Copy link
Contributor Author

@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
Labels
Projects
None yet
Development

No branches or pull requests

2 participants