0

I am using:

dotnet pack MyProject.csproj

for creating nuget netstandard/net462 packages and it works fine for simple use cases.

How do I configure MyProject.csproj to include files in the "build" nuget level? Or can I add reference to nuspec file from .csproj ?

This is how it would be in .nuspec file:

<package>
    <files>
        <file src="Libs\*.*" target="build" />
    </files>
</package>
user007
  • 1,122
  • 1
  • 10
  • 30

1 Answers1

0

There is a tag in csproj that points to the nuspec file to be used instead of the csproj:

  <NuspecFile>MyLibrary.nuspec</NuspecFile>
  <NuspecProperties>version=$(Version);id=$(AssemblyName)</NuspecProperties>
user007
  • 1,122
  • 1
  • 10
  • 30