Skip to content

Consider moving away from nuspec #15650

@Youssef1313

Description

@Youssef1313

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions