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

Pack target can't create contentFiles with build actions correctly #4166

Closed
clairernovotny opened this issue Dec 30, 2016 · 4 comments
Closed
Assignees
Labels
Functionality:Pack Type:DCR Design Change Request
Milestone

Comments

@clairernovotny
Copy link

clairernovotny commented Dec 30, 2016

When reviewing the spec for the Pack target
https://github.com/NuGet/Home/wiki/Adding-nuget-pack-as-a-msbuild-target

In the section where it talks about contentFiles, it says"

Apart from Content items, the <Pack> and <PackagePath> metadata can also be set on files with Build Action = Compile, EmbeddedResource, ApplicationDefinition, Page, Resource, SplashScreen, DesignData, DesignDataWithDesignTimeCreatableTypes, CodeAnalysisDictionary, AndroidAsset, AndroidResource, BundleResource or None.

I'm not sure how that's going to work correctly. The content that I want to pack is not going to be of that type in the library itself. For example, in my xUnit for Devices library, I have an App.Xaml.pp that is "Content" in my library, but the buildAction needs to be ApplicationDefinition. It cannot be "ApplicationDefinition" with metadata in the library itself.

What it needs is Content or None with a metadata BuildAction where I can specify what it should be in the nuget.

But that's not enough either. It also needs to provide arbitrary key/value metadata that will go on the generated item. For example I need a "Generator" metadata with the value of MSBuild:Compile to go on the XAML ones.

XAML Forms requires other similar things too. Rather than hard-code every combination of metadata that gets attached to the generated item, something more generic that encodes a key/value pair would be better.

@clairernovotny
Copy link
Author

Related to #1980 and #1979

@clairernovotny
Copy link
Author

/cc @emgarten

@rrelyea rrelyea added this to the 4.0 RC3 milestone Dec 30, 2016
@rrelyea rrelyea modified the milestones: 4.0.1, 4.0 RC3 Jan 5, 2017
@rrelyea
Copy link
Contributor

rrelyea commented Jan 5, 2017

This sounds like a good capability to add. Let's consider right after 4.0.

@clairernovotny
Copy link
Author

clairernovotny commented Jul 29, 2018

This still doesn't work completely. It limits the allowed BuildActions artificially. I need to add LinkDescription to include a specific xml file, but it doesn't generate the right build action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:Pack Type:DCR Design Change Request
Projects
None yet
Development

No branches or pull requests

3 participants