-
Notifications
You must be signed in to change notification settings - Fork 1.9k
When Xamarin.Forms isn't referenced in the head projects, XF build targets aren't imported #9593
Comments
|
Useful for context, but the
How is it different from today where we effectively have XF (and XF.Essentials) being required in head projects always? (they are even in our templates). |
@StephaneDelcroix @mrward thoughts? |
this |
this issue is exactly what buildTransitive is there to solve. Sadly the nuget team hasn't been able to backport yet |
So @StephaneDelcroix, why would there be a delta in the xamlc behavior? Aren't customers already adding the XF package to every project in their solution already since that's how things "just work" nowadays? I think this will make our projects even less cluttered, and we should take advantage of it. |
@kzu if we put these files into both \build\ (for VS 2017 compatibility) and \buildTransitive\ is that ok? I did some binlog tests and it seems like if I have \buildTransitive\ that \build\ gets ignored on VS 2019 and things don't get doubled up |
@PureWeen That's exactly what happens yes. There's just not really a reason not to do buildTransitive. It just sucks it doesn't work for VS2017 people, but Xamarin has already essentially dropped VS2017 support at this point (not officially but anything Xamarin Android or iOS compiled with VS2019 is most likely not VS2017 compatible) |
closed by #10125 |
Description
(context: NuGet/Home#6091)
Currently, we sort of force users to update their package reference to XF in every project, because otherwise none of the XF build targets are imported. XF could improve this by relying on the new-ish
buildTransitive
feature mentioned above, which allows transitive importing of those targets. This means we can simplify the project template, but more importantly, ensure customers have a more streamlined experience in updating XF: they would just need to do it on the NS library project(s).Steps to Reproduce
msbuild -t:ShowCapabilities
:XamarinForms
capability is rendered.PackageReference
from the headmsbuild -r -t:ShowCapabilities
(the-r
is key to perform a new restore).Expected Behavior
Step 5 shows
XamarinForms
capability is still present, since targets should flow transtively.Actual Behavior
XamarinForms
capability is gone, and with it, all of the XF targets.Basic Information
Workaround
Just like today, you need to add the XF dependency on all heads, and keep them in sync with the library.
To verify that the fix/improvement would work, you can just copy the entire
build
folder from your nuget package cache intobuildTransitive
folder, delete obj on your solution, and now the capability will properly propagate transitively.The text was updated successfully, but these errors were encountered: