Skip to content

How to add contentFiles XML element to resulting nuspec? #197

Closed Answered by kzu
jwfx asked this question in Q&A
Discussion options

You must be logged in to vote

Here's a sample with public package Avalonia.Native that works with latest nugetizer.

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <PackageId>Packaging.Native</PackageId>
    <TargetFramework>net8.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Avalonia.Native" Version="11.0.4" Pack="false" GeneratePathProperty="true" />
    <PackageReference Include="NuGetizer" Version="1.2.1" />
  </ItemGroup>

  <ItemGroup>
    <PackageFile Include="runtimes\osx\native\libAvaloniaNative.dylib" PackagePath="contentFiles\any\any\avalonia\osx\" PackageReference="Avalonia.Native" />
…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@jwfx
Comment options

@kzu
Comment options

Answer selected by kzu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants