You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
References are broken (sometimes) in universal app class libraries (Windows 8.1 + Windows Phone 8.1) #281
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.
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'
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.
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.
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.
Activity
forki commentedon 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?
christianlang commentedon Oct 21, 2014
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 commentedon Oct 21, 2014
please try 0.9.0-alpha002
forki commentedon Oct 21, 2014
do you know what
net45-win8-wp8-wpa81is? that's the other one in your sample. seems it's not listed in our inofficial list.christianlang commentedon Oct 21, 2014
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 commentedon Oct 21, 2014
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 commentedon Oct 21, 2014
at the moment we do:
your solution sound like a real step forward.
christianlang commentedon Oct 21, 2014
hehe, perfect picture :)
forki commentedon 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 commentedon Oct 22, 2014
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 commentedon Oct 22, 2014
catching fire? Nice.
christianlang commentedon Nov 21, 2014
@forki It's been a while, but here's what I came up with in the meantime: #380.