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
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.
The text was updated successfully, but these errors were encountered:
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.
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"
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.
The text was updated successfully, but these errors were encountered: