Looking at NuGet's implementation, the default build action for any content files that don't have nuspec metadata is compile. So for source code, it's technically unnecessary to add the nuspec content file metadata. Even if it's not documented, changing it would break a lot of packages/projects, so I'm sure the behavior will never change.
FWIW, we consider using a nuspec file "the old way". You already have a csproj in this directory, so you could consider moving to msbuild based build. It looks like you probably already use dotnet pack to pack all the nupkgs. I expect copilot or other AIs to do a good job automating the migration from nuspec to full msbuild pack, so I won't bother writing hints here, but if you decide to take it on and need help, reach out. I think it'd be just 3 lines (well, XML elements, it depends if you format long elements across multiple lines) in the csproj, two for the readme, and one for all the source files that go in the contentFiles directory.
Originally posted by @zivkan in #15638 (comment)
Looking at NuGet's implementation, the default build action for any content files that don't have nuspec metadata is compile. So for source code, it's technically unnecessary to add the nuspec content file metadata. Even if it's not documented, changing it would break a lot of packages/projects, so I'm sure the behavior will never change.
FWIW, we consider using a nuspec file "the old way". You already have a csproj in this directory, so you could consider moving to msbuild based build. It looks like you probably already use
dotnet packto pack all the nupkgs. I expect copilot or other AIs to do a good job automating the migration from nuspec to full msbuild pack, so I won't bother writing hints here, but if you decide to take it on and need help, reach out. I think it'd be just 3 lines (well, XML elements, it depends if you format long elements across multiple lines) in the csproj, two for the readme, and one for all the source files that go in the contentFiles directory.Originally posted by @zivkan in #15638 (comment)