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

contentFiles from nuget not shown in Xamarin Android XAML App project #3804

Open
MaceWindu opened this issue Jul 28, 2018 · 5 comments
Open
Assignees
Labels
Feature-NuGet NuGet integration including pushing it properties, project and package references, and Pack support. Legacy Issues against the legacy project system. Triage-Approved Reviewed and prioritized
Milestone

Comments

@MaceWindu
Copy link

We have nuget package that installs some T4 files for codegeneration using contentFiles.
While it is already behave differently for old/new projects by including files as-is or as links, for xamarin project I don't see those files in project tree at all.

What is interesting, is that templates work - I just need to create tt file manually. But it is only because I know what to do. Normally users read instruction, create tt file using sample file and run it, but now they cannot do it, because nor instruction, nor sample template is visible to them.

@MaceWindu
Copy link
Author

Closing. Looks like VS2017 15.8 preview 5 (or 15.8 in general?) fixed it

@MaceWindu
Copy link
Author

MaceWindu commented Aug 19, 2018

I want to reopen it as I just messed up with my testing and made wrong assumptions about it being fixed.

How to reproduce:

  • create new Android XAML App (Xamarin.Forms) project (APPNAME)
  • install System.Data.SQLite.Core 1.0.109.1 to APPNAME project
  • install linq2db.sqlite 2.2.0 to APPNAME project
  • install System.Data.SQLite.Core 1.0.109.1 to APPNAME.Android project
  • install linq2db.sqlite 2.2.0 to APPNAME.Android project

You can use templates in both projects, but LinqToDB.Templates folder visible to user only in APPNAME project.

@MaceWindu MaceWindu reopened this Aug 19, 2018
@Pilchie Pilchie added Feature-NuGet NuGet integration including pushing it properties, project and package references, and Pack support. Legacy Issues against the legacy project system. labels Aug 20, 2018
@Pilchie Pilchie added this to the 16.0 milestone Aug 20, 2018
@Pilchie
Copy link
Member

Pilchie commented Aug 20, 2018

This appears to be <PackageReference> in the native project system having an issue with the content files support.

@tmeschter
Copy link
Contributor

This is closely related to #3042.

The difference here is that the APPNAME project is SDK-based, while APPNAME.Android is not. This leads to differences in how we handle contentFiles during restore and build, unfortunately.

In SDK-based projects, information about the contentFiles is written out to the obj\APPNAME.csproj.nuget.g.props file when the project is restored. We can find these items and surface them in Solution Explorer simply by reading the .csproj file and its <Import>s.

In non-SDK-based projects, restore does not write information about contentFiles out to the .nuget.g.props files. Instead, that data is dynamically generated at build time by certain MSBuild tasks/targets. We generally don't show items generated by tasks/targets in Solution Explorer.

The resolution of this bug is probably dependent on how we decide to handl #3042.

@jjmew jjmew modified the milestones: 16.0, 16.X Feb 6, 2019
@jjmew jjmew added the Triage-Approved Reviewed and prioritized label Feb 6, 2019
@tmeschter
Copy link
Contributor

Tom's triage notes: The fate of this issue is dependent on what we decide about #3042.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature-NuGet NuGet integration including pushing it properties, project and package references, and Pack support. Legacy Issues against the legacy project system. Triage-Approved Reviewed and prioritized
Projects
None yet
Development

No branches or pull requests

5 participants